Ejemplo n.º 1
0
 public function create()
 {
     $city = City::all();
     $type = VehicleType::all();
     $partner = Partner::all();
     return view::make('vehicle::addVehicle', compact('city', 'type', 'partner'));
 }
Ejemplo n.º 2
0
 function armada()
 {
     $armada = Vehicle::where('VEHICLE_CREATEBY', '=', $this->partner_id)->get();
     $route = Route::getRoutePartner($this->partner_id);
     $city = City::all();
     $type = VehicleType::all();
     return view('travelpartner::armada.index', compact('armada', 'route', 'city', 'type'));
 }
Ejemplo n.º 3
0
 function getAllCity()
 {
     $city = City::all();
     return Datatables::of($city)->addColumn('action', function ($city) {
         return '<li  class="dropdown dropdown-no-type"><a data-toggle="dropdown" class="dropdown-toggle btn btn-xs btn-primary" href="#" > Pilihan <b class="caret"></b></a><ul class="dropdown-menu"><li><button class="btn btn-primary" id="' . $city->CITY_ID . '">Edit</button></li><li><button class="btn btn-danger" id="' . $city->CITY_ID . '" data-target="#hapusUser">Hapus</button></li></ul></li>';
     })->addColumn('photo', function ($vehicle) {
         return '<img src="public/Assets\\vehiclePhoto/' . $vehicle['VEHICLE_PHOTO'] . '" style="width:50px; height:50px">';
     })->make(true);
 }
Ejemplo n.º 4
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);
 }
Ejemplo n.º 5
0
 function scheduleSearchRentang()
 {
     $data = Input::all();
     $city = City::all();
     $data = Input::all();
     $tanggal = $data['RENT_SCHEDULE_DATE'];
     $start = date('Y-m-d', strtotime(' -7 day', strtotime($tanggal)));
     $finish = date('Y-m-d', strtotime(' +7 day', strtotime($tanggal)));
     $vehicle = Rentschedule::rentScheduleRentang($data['CITY_ID'], $start, $finish)->distinct()->get();
     $duration = 1;
     Session(['duration' => $duration]);
     //print_r($vehicle);
     return view('rentpage::hasil-search', compact('vehicle', 'city', 'duration'));
 }
 function travelSearch()
 {
     $city = City::all();
     return view('linkfooter::travelSearch', compact('city'));
 }
 function scheduleSearchRentang()
 {
     $data = Input::all();
     $city = City::all();
     $data = Input::all();
     $tanggal = $data['TRAVEL_SCHEDULE_DATE'];
     $start = date('Y-m-d', strtotime(' -7 day', strtotime($tanggal)));
     $finish = date('Y-m-d', strtotime(' +7 day', strtotime($tanggal)));
     $schedule = Travelschedule::travelScheduleRentang($data['depart'], $data['dest'], $start, $finish)->get();
     return view('travelpage::hasil-search', compact('schedule', 'city'));
 }
Ejemplo n.º 8
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $link_travel = LinkTravel::all();
     $city = City::all();
     return view('page.index', compact('city', 'link_travel'));
 }
Ejemplo n.º 9
0
 public function index()
 {
     $city = City::all();
     return view('travel::route.index', compact('city'));
 }