public function run()
 {
     Equipment::create(['title' => '2012 American Augers DD-10 Directional Drill', 'description' => '100,000 pound drill rig has operators cabin with heat and A/C and wireline drive chuck, includes 8 empty rod boxes.', 'status' => 'available']);
     Equipment::create(['title' => '2009 Vermeer D100x120 Series II Directional Drill', 'description' => 'Unit is equipped with a 200 GPM Kerr pump, FSII drive chuck, does not include any drill rod but has 5 empty baskets.', 'status' => 'sold']);
     Equipment::create(['title' => '2008 Vermeer D100x120 Series II Directional Drill', 'description' => 'Used D100x120 Series II has been inspected by a certified service technician and is in good condition.', 'status' => 'sold']);
     //... add more starter equipment
 }
 public function store(CreateEquipmentRequest $request)
 {
     $equipment = Equipment::create($request->all());
     $equipment->warranty_expiration = $request->get('warranty_expiration') ? Carbon::createFromFormat('m/d/Y', $request->get('warranty_expiration')) : null;
     $equipment->save();
     return redirect()->route('companies.show', $request->get('company_id'))->with('successes', ['equipment created successfully']);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // DB::table('equipment')->delete();
     Equipment::create(array('equipmenttype' => 'PC'));
     Equipment::create(array('equipmenttype' => 'NB'));
     Equipment::create(array('equipmenttype' => 'Mouse'));
     Equipment::create(array('equipmenttype' => 'Bag'));
     Equipment::create(array('equipmenttype' => 'Charger'));
     Equipment::create(array('equipmenttype' => 'Monitor'));
     Equipment::create(array('equipmenttype' => 'Keyboard'));
 }
Beispiel #4
0
 public function postEquipmnt(FormEquipmenteAdminRequest $request)
 {
     if (!empty($request)) {
         $data = $request->all();
         $data['flagactive'] = $request->get('flagactive', 1);
         if ($request->id) {
             $obj = Equipment::find($request->id);
             $obj->update($data);
         } else {
             $obj = Equipment::create($data);
         }
         return array('msg' => 'ok', 'state' => 1, 'data' => null);
     }
     return array('msg' => 'Error al guardar el modelo', 'state' => 0, 'data' => null);
 }
 public function createEquipment(Request $request)
 {
     $equipment = Equipment::create($request->all());
     return response()->json($equipment);
 }