本文整理匯總了PHP中Illuminate\Auth\AuthManager::driver方法的典型用法代碼示例。如果您正苦於以下問題:PHP AuthManager::driver方法的具體用法?PHP AuthManager::driver怎麽用?PHP AuthManager::driver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Auth\AuthManager
的用法示例。
在下文中一共展示了AuthManager::driver方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct(AuthManager $auth, Repository $config)
{
$this->auth = $auth;
$this->properties = collect();
$authDriver = $config['laravel-activitylog']['default_auth_driver'] ?? $auth->getDefaultDriver();
if (starts_with(app()->version(), '5.1')) {
$this->causedBy = $auth->driver($authDriver)->user();
} else {
$this->causedBy = $auth->guard($authDriver)->user();
}
$this->logName = $config['laravel-activitylog']['default_log_name'];
$this->logEnabled = $config['laravel-activitylog']['enabled'] ?? true;
}
示例2: driver
/**
* Get a driver instance.
*
* @param string $driver
* @return mixed
* @static
*/
public static function driver($driver = null)
{
//Method inherited from \Illuminate\Support\Manager
return \Illuminate\Auth\AuthManager::driver($driver);
}
示例3: __construct
public function __construct(AuthManager $auth, UserInterface $user)
{
$this->auth = $auth->driver();
$this->user = $user;
}
示例4: __construct
/**
* @param \Illuminate\Auth\AuthManager $auth
*/
public function __construct(AuthManager $auth)
{
// Get the driver behind the AuthManager (i.e. the Guard instance)
$this->auth = $auth->driver();
}