Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
501いいね 14,692 views回再生

Authorization in Laravel: Can You Do That?

There's another "auth" that Laravel makes incredibly easy out of the box: authorization. But just how is authentication and authorization different?

Let's take a look at Gates and Policies, when to use one over the other, and the basics of how you can check if a user is authorized to do something anywhere in your application.

**clarification: while you can use $this authorize() in a Livewire class, you will need to use Gate authorize() in a controller in Laravel 11

*note: there's a LOT of awesome helper functions and ways to check gates and policies that we didn't talk about. The docs are a great place to dive deeper.

Authorization Docs: https://laravel.com/docs/11.x/authori...

コメント