:: 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