Ejemplo n.º 1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('garage_type')->delete();
     $garage_type_first = new GarageType();
     $garage_type_first->type_id = 1;
     $garage_type_first->type_name = '一类汽车维修企业';
     $garage_type_first->save();
     $garage_type_second = new GarageType();
     $garage_type_second->type_id = 2;
     $garage_type_second->type_name = '二类汽车维修企业';
     $garage_type_second->save();
     $garage_type_third = new GarageType();
     $garage_type_third->type_id = 3;
     $garage_type_third->type_name = '三类汽车维修企业';
     $garage_type_third->save();
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $garage = Garage::findOrFail($id);
     $admin = User::findOrFail($garage->admin_id);
     $garage_types = GarageType::lists('type_name', 'type_id');
     return view('back.garage.check.show', compact('garage', 'admin', 'garage_types'));
 }
Ejemplo n.º 3
0
 public function createGarage()
 {
     $garage_types = GarageType::lists('type_name', 'type_id');
     return view('back.test.garage.create', compact('garage_types'));
 }