/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('users')->delete();
     # Usuario: admin@mail.com
     # Password: !UrL_p2@
     User::create(['name' => 'Administrador', 'email' => '*****@*****.**', 'password' => '$2y$10$2omZfzNdXnP0.HyrIB5e6.TrBFLCaBG9Yk4Xhh9hBgch/fktME/Qq']);
 }
Пример #2
0
 /**
  * Show the application registration form.
  *
  * @return view
  */
 public function store(Request $request)
 {
     $validator = $this->validator($request->all());
     if ($validator->fails()) {
         $this->throwValidationException($request, $validator);
     }
     User::create(['name' => $request['name'], 'email' => $request['email'], 'password' => bcrypt($request['password'])]);
     return redirect('/users/')->with('message', 'store');
 }
Пример #3
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'])]);
 }