public function create() { $city = City::all(); $type = VehicleType::all(); $partner = Partner::all(); return view::make('vehicle::addVehicle', compact('city', 'type', 'partner')); }
function destroy() { $id = Input::get('CITY_ID'); $city = City::findCity($id); $city->delete(); return back(); }
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')); }
/** * 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); }
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')); }
/** * 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')); }
public function index() { $city = City::all(); return view('travel::route.index', compact('city')); }