/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //
     \App\ServiceType::create(['service_name' => 'Colocation']);
     \App\ServiceType::create(['service_name' => 'Facility Management']);
     \App\ServiceType::create(['service_name' => 'DRC']);
     \App\ServiceType::create(['service_name' => 'Hosting']);
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function getCreate()
 {
     $dc_customers = DcCustomers::all();
     $dc_customer = "";
     $customers = Customers::all();
     $customer = "";
     $locations = DcLocation::all();
     $location = "";
     $service_types = ServiceType::all();
     $service_type = "";
     return view('admin.customers.create_edit_dc_customer', compact('dc_customer', 'dc_customers', 'location', 'locations', 'service_type', 'service_types', 'customers', 'customer'));
 }
Ejemplo n.º 3
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create(Phpgmaps $gmpas)
 {
     $config['center'] = config('gmap.center');
     $config['zoom'] = 15;
     $gmpas->initialize($config);
     $marker = [];
     $marker['position'] = config('gmap.center');
     $marker['draggable'] = true;
     $marker['ondragend'] = '$("#latitude").val(event.latLng.lat()); $("#longitude").val(event.latLng.lng());';
     $gmpas->add_marker($marker);
     $map = $gmpas->create_map();
     $service_types = ServiceType::lists('name', 'id');
     return view('services.create')->with('map', $map)->with('service_types', $service_types)->with('title', trans('titles.new_service'));
 }
 /**
  * Reorder items
  *
  * @param items list
  * @return items from @param
  */
 public function getReorder(ReorderRequest $request)
 {
     $list = $request->list;
     $items = explode(",", $list);
     $order = 1;
     foreach ($items as $value) {
         if ($value != '') {
             ServiceType::where('id', '=', $value)->update(array('position' => $order));
             $order++;
         }
     }
     return $list;
 }
Ejemplo n.º 5
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $service_types = ServiceType::All();
     return view('advisor.setting_create')->with('service_types', $service_types);
 }
Ejemplo n.º 6
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $service_type = ServiceType::findOrFail($id);
     $service_type->delete();
     return Redirect::to('service_type');
 }