DEV Community

Cover image for Laravel 9 - Check Multiple Permissions at Once
Sandro Jhuliano Cagara
Sandro Jhuliano Cagara

Posted on

4

Laravel 9 - Check Multiple Permissions at Once

In addition to @can Blade directive, did you know you can check multiple permissions at once with @canany directive?

@canany(['update', 'view', 'delete'], $post)
    // This user can update, view, or delete
@elsecanany(['create'], \App\Example::class)
    // This user can create
@endcanany
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more