' Model ' = Appuser::class, what does this class mean at the end?

Source: Internet
Author: User
:: What does class mean?


' Users ' = [
' Driver ' = ' eloquent ',
' Model ' = App\user::class,
],


Search for half a day do not know what keyword search.


Reply to discussion (solution)

Should be a static property below the user class

App\user::class returns the class name "App\user"

App\user::class returns the class name "App\user"



Thank! Based on your return class name 4 words were searched under.
php5.5t attribute to get the full class name

The functionality of the alias class and namespace short version of the namespace is introduced in PHP5.3. Although this does not apply to string class names

Use Some\deeply\nested\namespace\foobar;    Does not work, because this would try to use the global ' FooBar ' class    $reflection = new Reflectionclass (' FooBar '); C2/>echo Foobar::class;  


To solve this problem, use the new Foobar::class syntax, which returns the full category name of the class
  • 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.