讨论数量:
In the config/app.php

In the vendor/laravel/framework/src/Illuminate/Support/Facades/Auth.php

There is no check() method declared explictly, but because the Auth class extents Facade class.
In the vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php
There is also no check() method declared explictly, but a magic method is quietly hiding in the bottom.

So in fact, auth::check() is equal to SessionGuard::check() which is the Root object behind the facde.
FYA: the SessionGuard class use the trait GuardHelpers which contains the check() method explictly!

In the config/app.php

In the vendor/laravel/framework/src/Illuminate/Support/Facades/Auth.php

There is no check() method declared explictly, but because the Auth class extents Facade class.
In the vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php
There is also no check() method declared explictly, but a magic method is quietly hiding in the bottom.

So in fact, auth::check() is equal to SessionGuard::check() which is the Root object behind the facde.
FYA: the SessionGuard class use the trait GuardHelpers which contains the check() method explictly!

关于 LearnKu
推荐文章: