1. Go to this page and download the library: Download fissible/vouch 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/ */
use App\Http\Controllers\ApproveInvoiceController;
use Illuminate\Support\Facades\Route;
Route::post('/invoices/{invoice}/approve', ApproveInvoiceController::class)
->middleware(['permission:invoices.approve']);
use Spatie\Permission\Middleware\PermissionMiddleware;
Route::post('/invoices/{invoice}/approve', ApproveInvoiceController::class)
->middleware([PermissionMiddleware::using('invoices.approve')]);