For example, when reading the document (Chinese), I found the term Guard, which defines "Guard defines how users implement authentication in each request ", there is a "custom guard" section later, and I am forced to. what does this guard mean. What does multi-user authentication mean ?... For example, when reading the document (Chinese), I found the term Guard, which defines "Guard defines how users implement authentication in each request ", there is a "custom guard" section later, and I am forced to. what does this guard mean.
What does multi-user authentication mean? Guards with different names are isolated for different authentication ??
Http://laravelacademy.org/post/3074.html#ipt_kb_toc_3074_23
In addition, what does provide mean ....
Reply content:
For example, when reading the document (Chinese), I found the term Guard, which defines "Guard defines how users implement authentication in each request ", there is a "custom guard" section later, and I am forced to. what does this guard mean.
What does multi-user authentication mean? Guards with different names are isolated for different authentication ??
Http://laravelacademy.org/post/3074.html#ipt_kb_toc_3074_23
In addition, what does provide mean ....
In fact, whether it is Guard or Provide, you can understand it. A plug-in for a specific function.
Laravel is a foreigner and elegant, so he makes different things independent and nice-looking (it seems that there is a language problem)
Then let's talk about the official usage of these things ..
Guard, like the Chinese meaning of this time, is the meaning of Guard, that is, the door Guard ..
Its role is to process an authentication to determine whether each request or call has been logged on or is allowed to pass. In fact, this middleware can also be implemented. However, as an elegant framework, there is naturally an elegant classification ..
You can log on with a password, create a Guard, log on with QQ, and create another Guard. Any login form you want to verify, or interface verification, can be encapsulated into an independent Guard for calling ..
As for provide, it is not the exclusive authentication here. it is the basic core of Laravel. The official translation is called a service provider.
There are only a few agreed methods, which are roughly. Run the boot command when running the service, and register the register and hooks of some items of the service. The main purpose is to provide various services for the framework.
For example, if you create a service for formatting the output, the service will convert all non-formatted values in the output json into formatted values during execution .. Then the service is registered under the output object. It is called ShowMyJSON, and you can use it directly during output ..
I feel confused... Laravel is not easy to understand. Just take it easy. Just like assembling a robot. You just need to install something somewhere.
Take a closer look at the official documentation it: https://laravel.com/docs/5.2/authentication#adding-custom-guards
Or come to my little station https://laravist.com/, for a lot of knowledge have in-depth explanation