PHP code example of frankliniwobi / laravel-action-command
1. Go to this page and download the library: Download frankliniwobi/laravel-action-command library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
frankliniwobi / laravel-action-command example snippets
namespace App\Actions;
use Illuminate\Support\Facades\DB;
final readonly class UserStoreAction
{
/**
* Execute the action.
*/
public function handle(): void
{
DB::transaction(function (): void {
// action
});
}
}
bash
php artisan vendor:publish --tag=laravel-action-stubs