public function getRequests($id) { return Response::json(DbUtil::serializeRoutes(Route::where('state', 'requested')->where('ride_id', $id)->get())); }
public function getRequests() { return Response::json(DbUtil::serializeRoutes(Route::where('user_id', Auth::user()->id)->where('state', 'requested')->get())); }