[PHP] On Laravel Authorization of gates and policies

 

First to distinguish between Authentication and Authorization, authentication and authorization, thickness are different.

Authorization (Authorization) There are two main ways, Gates and Policies.

Gates and Policies defined can be compared Routes and Controllers:

Gates authorized user defined callback function and Class @ method in two ways, Policies around the model defined by class authorization logic.

 

Doc:https://laravel.com/docs/6.x/authorization

Link:https://www.cnblogs.com/farwish/p/11821670.html

Guess you like

Origin www.cnblogs.com/farwish/p/11821670.html