/** * 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'])]); }
/** * Run the database seeds. * * @return void */ public function run() { $data = array(['name' => 'Oved', 'last_name' => 'FiSo', 'email' => '*****@*****.**', 'user' => 'ovedfs', 'password' => \Hash::make('123456'), 'type' => 'admin', 'active' => 1, 'address' => 'San Cosme 290, Cuauhtemoc, D.F.', 'created_at' => new DateTime(), 'updated_at' => new DateTime()], ['name' => 'Adela', 'last_name' => 'Torres', 'email' => '*****@*****.**', 'user' => 'adela', 'password' => \Hash::make('123456'), 'type' => 'user', 'active' => 1, 'address' => 'Tonala 321, Jalisco', 'created_at' => new DateTime(), 'updated_at' => new DateTime()]); User::insert($data); }