/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('users')->truncate();
     //admin
     User::create(['name' => 'Elvin', 'last_name' => 'Makhmudov', 'email' => '*****@*****.**', 'is_admin' => true, 'password' => bcrypt('password')]);
     //dummy user
     User::create(['name' => 'John', 'last_name' => 'Doe', 'email' => '*****@*****.**', 'password' => bcrypt('password')]);
 }
Exemplo n.º 2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array $data
  * @return User
  */
 public function create(array $data)
 {
     $user = User::create(['name' => $data['name'], 'last_name' => $data['last_name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'is_admin' => $data['is_admin']]);
     if (isset($data['thumbnail'])) {
         $this->extractThumbnail($data['thumbnail'], $user);
     }
     return $user;
 }
Exemplo n.º 3
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['name' => $data['name'], 'last_name' => $data['last_name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }