コード例 #1
0
 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
0
ファイル: _ide_helper.php プロジェクト: satriashp/tour
 /**
  * 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
0
ファイル: UserPipe.php プロジェクト: hughfletcher/nuticket
 public function __construct(AuthManager $auth, UserInterface $user)
 {
     $this->auth = $auth->driver();
     $this->user = $user;
 }
コード例 #4
0
 /**
  * @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();
 }