コード例 #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $defaultUser = ['email' => '*****@*****.**', 'password' => '1234', 'first_name' => '{{first_name}}', 'last_name' => '{{last_name}}'];
     $this->auth->registerAndActivate($defaultUser, false);
     $role = $this->role->getBySlug('administrator');
     $user = $this->user->getById(1);
     $role->users()->attach($user);
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 public function create(array $data, $validate = true)
 {
     $this->rules = ['email' => 'required|unique:users', 'password' => 'required|confirmed', 'password_confirmation' => 'required'];
     if ($validate) {
         $this->validate($data);
     }
     $this->auth->registerAndActivate($data);
     return;
 }