feat: initial commit
This commit is contained in:
19
app/Commands/Transmittal/StoreRemarkCommand.php
Normal file
19
app/Commands/Transmittal/StoreRemarkCommand.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Commands\Transmittal;
|
||||
|
||||
use App\Commands\Command;
|
||||
use App\Models\Remark;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class StoreRemarkCommand implements Command
|
||||
{
|
||||
|
||||
public function execute(array $data): mixed
|
||||
{
|
||||
return DB::transaction(
|
||||
callback: fn () => Remark::query()->create($data),
|
||||
attempts: 2
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user