Exemplo n.º 1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('staff_types')->truncate();
     $type_1 = StaffType::create(array('staff_type' => 'Academic', 'status_id' => 1));
     $type_2 = StaffType::create(array('staff_type' => 'Non Academic', 'status_id' => 1));
 }
Exemplo n.º 2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $data['title'] = 'Edit Staff';
     $data['staff'] = Staff::find($id);
     $data['staff_menu'] = 1;
     $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select');
     $data['countries'] = Country::lists('name', 'id')->prepend('Please Select');
     $data['states'] = State::lists('name', 'id')->prepend('Please Select');
     $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select');
     $data['staff_types'] = StaffType::lists('staff_type', 'id')->prepend('Please Select');
     return view('admin.staff.edit', $data);
 }