PHP code example of ringlesoft / laravel-process-approval
1. Go to this page and download the library: Download ringlesoft/laravel-process-approval 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/ */
ringlesoft / laravel-process-approval example snippets
class FundRequest extends Model implements ApprovableModel
{
// Your model content
}
class FundRequest extends Model implements ApprovableModel
{
use \RingleSoft\ProcessApproval\Traits\Approvable;
// Your model content
}
class FundRequest extends Model implements ApprovableModel
{
use \RingleSoft\ProcessApproval\Traits\Approvable;
// Your model content
public function onApprovalCompleted(ProcessApproval $approval): bool
{
// Write logic to be executed when the approval process is completed
return true;
}
}
Class User extends Model {
...
public function getSignature(){
return $this->signature_path; // Return the path to user's signature
}
}
class ApprovalNotificationListener
{
...
/**
* Handle the event.
*/
public function handle(ApprovalNotificationEvent $event): void
{
session()->flash('success', $event->message);
}
}