What does the guard in the Laravel certification mean?

Source: Internet
Author: User
Title, when reading a document (Chinese) found the term guard, which is defined in the document "guard defines how the user authenticates in each request", and then there is a "custom Guard" chapter, and then I get confused, what does this Guard mean.
is multi-user authentication The meaning of it? Different names of the guard isolated, different certification??
Http://laravelacademy.org/post/3074.html#ipt_kb_toc_3074_23

Besides, what does provide mean ....

Reply content:

Title, when reading a document (Chinese) found the term guard, which is defined in the document "guard defines how the user authenticates in each request", and then there is a "custom Guard" chapter, and then I get confused, what does this Guard mean.
is multi-user authentication The meaning of it? Different names of the guard isolated, different certification??
Http://laravelacademy.org/post/3074.html#ipt_kb_toc_3074_23

Besides, what does provide mean ....

In fact, whether it is guard or provide, you can understand. A plug-in for a particular feature.
Laravel is a foreigner's thing, pay attention to elegance, so make different things into independent and good-looking things (seems to explain the faulty wordings)
Then let's talk about the official usage of these things.
Guard, as the Chinese meaning of this time, is the meaning of the guard, that is, the janitor.
His role is to deal with a certification, to determine whether each request, call is logged in, or allowed to pass, in fact, this middleware can also be implemented. But, as an elegant framework, nature has an elegant collation.
You can log in with a password, create a GUARD,QQ login, and create another guard. Any login form you want to verify, or interface validation, can be encapsulated as a separate guard to invoke.

As for provide, it is not the exclusive of authentication here, he is the core of the laravel in the comparison of things. Official translations are called service providers.
There are only a few agreed methods in him, roughly. Run this service when executing the boot, and registering some things for this service register as well as hooks or something. The main purpose is to provide a variety of services for the framework.
For example, you create a service that formats the output, which translates the non-character values of the output JSON into character types when executed. The service then registers under the output object. Called Showmyjson, then you can use it directly in the output.

Feel you will listen to confused ... Laravel just contact really bad understanding. Just take it easy. Just like assembling a robot. If you need anything, just put it in a place.

Take a closer look at the official documents: Https://laravel.com/docs/5.2/authentication#adding-custom-guards

Or come to my station https://laravist.com/, a lot of knowledge have in-depth explanation

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.