Implement project board status workflow
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Tickets;
|
||||
|
||||
use App\Models\Ticket;
|
||||
use App\Models\TicketWorklogEntry;
|
||||
use App\Models\User;
|
||||
|
||||
class CreateTicketWorklogEntry
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed>|null $changes
|
||||
*/
|
||||
public function handle(
|
||||
Ticket $ticket,
|
||||
?User $actor,
|
||||
string $entryType,
|
||||
string $summary,
|
||||
?array $changes = null,
|
||||
): TicketWorklogEntry {
|
||||
return $ticket->worklogEntries()->create([
|
||||
'actor_id' => $actor?->id,
|
||||
'changes' => $changes,
|
||||
'entry_type' => $entryType,
|
||||
'summary' => $summary,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user