public function store(PersonalCreateRequest $request) { Personal::create($request->all()); \Session::flash('message', 'Personal Creado Correctamente'); return redirect('personal'); }
public function insertpersonalempresa() { $data = Input::all(); $data["user_id"] = $this->user->id; Personal::create($data); return $data; }
public function postRegistrarPersonal(Request $request) { $personal = Personal::create(['user_id' => Auth::user()->id, 'full_name' => $request->get('nombres'), 'dni' => $request->get('dni'), 'email' => $request->get('email'), 'phone' => $request->get('telefono'), 'address' => $request->get('direccion')]); $usuario = User::create(['full_name' => $request->get('nombres'), 'username' => $request->get('usuario'), 'password' => Hash::make($request->get('clave'))]); $personal->save(); $usuario->save(); return redirect('personal/contratacion'); }
/** * Run the database seeds. * * @return void */ public function run() { DB::table('personals')->delete(); Personal::create(array('prefix' => 'Mr.', 'user_id' => 1, 'firstname' => 'Hyginus', 'middlename' => 'miskoom', 'lastname' => 'Horson', 'gender' => 'male', 'marital_status' => 'married', 'dob' => '1995-10-05', 'country_address' => 156, 'office_state' => 32, 'address' => 'Old Airport road, Jos, Plateau State', 'country_office_address' => 156, 'lga_address' => 611, 'phone' => '08036914016', 'email' => '*****@*****.**', 'occupation' => 'teacher', 'market_associated' => 'main market', 'park_associated' => 'bukuru park', 'office_lga' => 611, 'drivers_license' => 'something2', 'national_id' => 'something', 'passport_number' => 'A025689H', 'disability' => 'blind', 'nationality' => 156, 'jtbtin' => '3887464738', 'origin_state' => 32, 'lga' => 611, 'tin' => '33434343434', 'workplace_name' => '0123456789')); }