feat: updates

This commit is contained in:
JP
2024-08-15 20:11:21 +08:00
parent 52431a2c61
commit 3af7207ec3
61 changed files with 1674 additions and 480 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Actions\Ledgers;
use App\Actions\BaseAction;
use App\Commands\Ledgers\CreateLedgerCommand;
use App\DataObjects\CreateLedgerDTO;
use Closure;
use Spatie\LaravelData\Data;
class CreateLedgerAction extends BaseAction
{
public function __construct(
private readonly CreateLedgerCommand $createLedgerCommand,
) {}
public function __invoke(CreateLedgerDTO|Data $payload, Closure $next)
{
$this->createLedgerCommand->execute($payload->data);
return $next($payload);
}
}