تماشای این درس نیاز به اشتراک حرفه‌ای دارد.

Laravel's authorization gates are wildly powerful and flexible thanks to their integration with the rest of the framework. Once you write a single line of code to define a new gate, you can then "perform" this authorization within your controllers, or as a middleware, or even as a Blade or PHP conditional in your views.

In this Larabit, we'll use the common example of an admin section that should be exclusive to a select few people on a website. We'll then write one line of authorization logic to declare who may access this section.

GatesAuthorization Middleware@can Blade Directive

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟