What are the Writing Gates and Policies ?

Answer Posted / surbhi

Gates are used to determine if a user is authorized to perform a specified action.
They are typically defined in App/Providers/AuthServiceProvider.php using Gate facade.
Gates are also functions which are declared for performing authorization mechanism.

Policies are declared within an array and are used within classes and methods which use authorization mechanism.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to serve sites with tls on valet?

411


What is compact in laravel?

394


How do I start laravel in ubuntu?

400


What is laravel route?

425


What is a pull() ?

713






Explain laravel’s middleware?

433


What is report method?

449


What is xss attack with example?

410


What is mvc framework laravel?

423


What are macros in laravel?

401


By default valet serve your app on which tld? How to configure it to use another domain?

388


What are redirect responses?

407


what is meant by Views ?

794


What is map function in laravel?

427


List out some artisan commands?

406