check multiple permission laravel spatie
You can check if a user has Any of an array of permissions:
$user->hasAnyPermission(['edit articles', 'publish articles', 'unpublish articles']);
If you need to check that the model has all the permissions, you should use
method hasAllPermissions()
$user->hasAllPermissions('View Consultant', 'View Administration', 'View Accountant', 'All departments')
or try something like this :
@canany(['update', 'view', 'delete'], $post)
<!-- The current user can update, view, or delete the post... -->
@elsecanany(['create'], \App\Models\Post::class)
<!-- The current user can create a post... -->
@endcanany
Also in PHP:
- current date string in php
- console.;og for php
- console.log equivalent for php
- clear nuget cache
- file to binary php
- a.length en php
- array_unique php array in array
- artisan laravel install
- afficher type et contenu d'une variable php
- config cache clear with code laravel
- curl error (code 3) url malformed laravel
- date format change in laravel blade
- .lenght en php string
- command to create laravel project
- count characters laravel
- array reverse in php example
- carbon add minutes
- clear file cache laravel
- create laravel app
- douzo definition
- date('Y ', $date);
- Databases supported by php
- Allowed memory size of 1610612736 bytes exhausted
- Created Migration: laravel