示例#1
0
 public static function password($password)
 {
     $that = new static(\App::make('validator'));
     $modelName = Club::modelName();
     $model = new $modelName();
     $rules = array_only($that->getUpdateRules($model), 'password');
     $that->validate(compact('password'), $rules);
 }
示例#2
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('lud/club');
     require __DIR__ . '/../../routes.php';
     $modelName = Club::modelName();
     $validatorName = Club::modelValidatorName();
     $table = with(new $modelName([]))->getTable();
     // @todo this is bad because it loads all the validation on every
     // request, we must be able to listen to Model::boot event.
     // More, laravel doesn't even reuse this object, it's only taking its
     // class name ...
     $modelName::observe(new $validatorName(App::make('validator')));
 }
示例#3
0
 /**
  * Get the contents of the users migration stub.
  *
  * @return string
  */
 protected function getMigrationStub()
 {
     $stub = $this->files->get(__DIR__ . '/stubs/users.stub');
     return str_replace('tablename_placeholder', Club::modelTableName(), $stub);
 }
示例#4
0
 public function getLogout()
 {
     Auth::logout();
     return Club::logoutRedirect();
 }