Пример #1
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param array $data
  *
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }
Пример #2
0
 public function run()
 {
     User::create(['name' => 'Súper Administrador', 'username' => 'superadmin', 'email' => '*****@*****.**', 'password' => 123, 'type' => 'superadmin', 'company_id' => 1, 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     User::create(['name' => 'Admin', 'username' => 'admin', 'email' => '*****@*****.**', 'password' => 123, 'type' => 'admin', 'company_id' => 1, 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
 }
Пример #3
0
 /**
  * Find a specified resource.
  */
 public function findUser(Route $route)
 {
     $this->user = User::findOrFail($route->getParameter('users'));
 }