PHP code example of hadimazalan / laravel-approval-workflow
1. Go to this page and download the library: Download hadimazalan/laravel-approval-workflow 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/ */
hadimazalan / laravel-approval-workflow example snippets
use Hadimazalan\ApprovalWorkflow\Facades\Approval;
use App\Models\Claim;
$claim = Claim::create([...]);
Approval::for($claim)
->level('Head of Department')
->level('Finance')
->level('CEO')
->notifyBy(['email', 'whatsapp'])
->start();