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:
1 view
84
24
4 days ago 00:02:22 1
Верное исполнение романса Сергея Рахманинова “Здесь хорошо“. Исполняет Юрий Гуляев, 1978 год
4 days ago 00:00:13 1
Да что ты черт побери такое несешь ? (Банды Нью-Йорка)