/** * Run the database seeds. * * @return void */ public function run() { DB::table('events')->delete(); DB::table('user_locations')->delete(); DB::table('users')->delete(); User::create(['api_token' => '123456', 'name' => 'Test User', 'email' => '*****@*****.**']); factory(App\Entities\User::class, 50)->create()->each(function ($user) { $user->location()->save(factory(App\Entities\UserLocation::class)->make()); $user->events()->save(factory(App\Entities\Event::class)->make()); $user->events()->save(factory(App\Entities\Event::class)->make()); }); }
/** * 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'])]); }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { return User::create(['username' => $data['username'], 'email' => $data['email'], 'password' => $data['password'], 'settings' => config('auth.settings')]); }
/** * Run the database seeds. * * @return void */ public function run() { $User = User::create(['name' => 'admin', 'lastname' => 'Larriega', 'email' => '*****@*****.**', 'numero_documento' => '44000355', 'password' => bcrypt('123456'), 'cargo_id' => 1]); Persona::create(['per_tipo' => '0001', 'per_nacion' => '0001', 'per_dcmto_tipo' => '0001', 'per_sexo' => '0001', 'per_dcmto_numero' => '44000355', 'per_ruc' => '', 'per_ape_paterno' => 'Larriega', 'per_ape_materno' => 'Grandez', 'per_nombre1' => 'Oscar', 'per_nombre2' => 'Augusto', 'per_fe_naci' => '1986-12-26', 'per_razon_social' => '', 'per_direccion' => 'Av kani jsbabdhasd', 'per_direc_referencia' => 'Alt cdra 12 brasil', 'per_alfabetico' => 'larriega grandes oscar augusto 67263748', 'per_crea_user' => $User->getKey(), 'per_act_user' => '', 'per_ubg_id' => 1, 'per_estado' => 1]); }
public function register($data) { User::create($data); }