本文整理汇总了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();
}