laravel框架中为什么可以使用static::的写法,难道有个叫static的类,然后访问一个静态方法make吗?
但是static是关键字,不可能作为类名吧
具体位置在vendor/laravel/framework/src/Illuminate/Support/Facades/Auth.php
class Auth extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'auth';
}
/**
* Register the typical authentication routes for an application.
*
* @return void
*/
public static function routes()
{
static::$app->make('router')->auth();
}
}
可以搜索一下
延迟静态绑定