예제 #1
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     $path = base_path() . '/jsonfile/ports.json';
     $string = file_get_contents("{$path}");
     $datashare['City'] = City::all();
     $datashare['Vehicle'] = Vehicle::where('VEHICLE.PARTNER_ID', Session::get('id'));
     $datashare['Bandara'] = json_decode($string, true);
     view()->share('datashare', $datashare);
 }
예제 #2
0
 function getarmada()
 {
     $path = url("public/Assets/vehiclePhoto");
     $vehicles = Vehicle::getarmada($this->partner_id)->distinct()->get();
     return Datatables::of($vehicles)->addColumn('action', function ($vehicle) {
         //  return '<a href="#edit-'.$user->USERS_ID.'" class="btn btn-xs btn-primary"><i class="glyphicon glyphicon-edit"></i> Edit</a><a href="#hapus-'.$user->USERS_ID.'" class="btn btn-xs btn-danger"><i class="glyphicon glyphicon-edit"></i> Hapus</a>';
         return '<button class="btn  btn-xs btn-primary" id="' . $vehicle->VEHICLE_ID . '"><i class="fa fa-pencil"></i> </button></a><button class="btn  btn-xs btn-danger" id="' . $vehicle->VEHICLE_ID . '" data-target="#hapusUser""><i class="fa fa-times"></i> </button>';
     })->addColumn('photo', function ($vehicle) use($path) {
         return '<img src="' . $path . '/' . $vehicle['VEHICLE_PHOTO'] . '" style="width:50px; height:50px">';
     })->make(true);
 }
예제 #3
0
 function destroy()
 {
     $id = Input::get('VEHICLE_ID');
     print_r($id);
     $vehicle = Vehicle::findVehicle($id);
     $vehicle->delete();
     return back();
 }
예제 #4
0
 function show($tanggal)
 {
     $route = Route::getAllRoute()->get();
     $vehicle = Vehicle::all();
     return view('travel::travel.listschedule', compact('tanggal', 'route', 'vehicle'));
 }
예제 #5
0
 function jadwalUmum()
 {
     $route = Route::getRoutePartner($this->partner_id)->get();
     $vehicle = Vehicle::where('PARTNER_ID', '=', $this->partner_id)->get();
     return view('travelpartner::jadwal.umum_index', compact('jadwal', 'route', 'vehicle'));
 }
예제 #6
0
 public function index()
 {
     $vehicle = Vehicle::all();
     return view('rent::rent_schedule.index', compact('vehicle'));
 }
예제 #7
0
 function __construct()
 {
     $this->partner_id = Session::get('id');
     $this->vehicle = Vehicle::where('PARTNER_ID', '=', $this->partner_id)->get();
 }