public function getUser(Request $request) { if ($request->input('user') == 'passenger') { return Passenger::getPassenger($request->contactNo); } elseif ($request->input('user') == 'driver') { return Driver::getDriver($request->input('contactNo')); } }
public function getDriver(Request $request) { //get basic information $driver = new Driver(); return $driver->getDriver($request->input('contactNo')); }