<?phpnamespace App\Policies;use App\Models\User;use Spatie\Permission\Models\Role;use Illuminate\Auth\Access\HandlesAuthorization;class RolePolicy{ use HandlesAuthorization; /** * Determine whether the user can view any models. * * @param \App\Models\User $user * @return \Illuminate\Auth\Access\Response|bool */ public function viewAny(User $user) { return $user->can('view_any_role'); } /** * Determine whether the user can view the model. * * @param \App\Models\User $user * @param \Spatie\Permission\Models\Role $role * @return \Illuminate\Auth\Access\Response|bool */ public function view(User $user, Role $role) { return $user->can('view_role'); }...
cd /home/ploi/demo.nrweb.agencygit reset --hard && git clean -dfgit pull origin mainnpm installecho "" | sudo -S service php8.1-fpm reloadcomposer install --no-interaction --prefer-dist --optimize-autoloader --no-devnpm cinpm run buildphp artisan migrate --forcephp artisan config:clearphp artisan event:clearphp artisan route:clearphp artisan view:clearphp artisan storage:linkphp artisan queue:restartecho "🚀 Application deployed!"