Example #1
0
 public function run()
 {
     DB::table('users')->truncate();
     // добавим тестового пользователя
     User::create(['name' => 'Wzhik', 'email' => '*****@*****.**', 'password' => '$2y$10$8PWGtapKovU0uWAs0rQSwO9YZczvIZrft.Dm9/WuhsAn.JhSYDpUy', 'created_at' => '2016-01-03 18:10:05']);
 }
Example #2
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'])]);
 }