PHP code example of faustoff / laravel-pm2-admin
1. Go to this page and download the library: Download faustoff/laravel-pm2-admin 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/ */
faustoff / laravel-pm2-admin example snippets
use Faustoff\LaravelPm2Admin\Http\Middleware\Authorize;
public function boot()
{
Gate::define(Authorize::ABILITY, function (?User $user) {
return (bool) $user?->isAdmin;
});
}
json
{
"scripts": {
"post-update-cmd": [
"@php artisan vendor:publish --tag=pm2-admin-assets --ansi --force"
]
}
}