setUsersModel() public static method

Set the model to be used for users.
public static setUsersModel ( string $model ) : void
$model string
return void
Beispiel #1
0
 /**
  * Set the model to be used for users.
  *
  * @param string  $model
  */
 public static function useUserModel($model)
 {
     Models::setUsersModel($model);
 }
 /**
  * Set the classname of the user model to be used by Bouncer.
  *
  * @return void
  */
 protected function setUserModel()
 {
     $config = $this->app->make('config');
     $model = $config->get('auth.providers.users.model', function () use($config) {
         return $config->get('auth.model', \App\User::class);
     });
     Models::setUsersModel($model);
     Models::setTables(['users' => Models::user()->getTable()]);
 }
Beispiel #3
0
 /**
  * Setup the database schema.
  *
  * @return void
  */
 public function setUp()
 {
     Models::setUsersModel(User::class);
     $this->clipboard = new CachedClipboard(new ArrayStore());
     $this->migrate();
 }
 /**
  * Set the classname of the user model to be used by Bouncer.
  *
  * @return void
  */
 protected function setUserModel()
 {
     $model = $this->app->make('config')->get('auth.model');
     Models::setUsersModel($model);
 }