Check Multiple Permissions at Once

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

1@canany(['update', 'view', 'delete'], $post)
2 // The current user can update, view, or delete the post
3@elsecanany(['create'], \App\Post::class)
4 // The current user can create a post
5@endcanany

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 22 courses (477 lessons, total 38 h 20 min)
  • 2 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord