/** * Returns the root path from which this request is executed. * * Suppose that an index.php file instantiates this request object: * * * http://localhost/index.php returns an empty string * * http://localhost/index.php/page returns an empty string * * http://localhost/web/index.php returns '/web' * * http://localhost/we%20b/index.php returns '/we%20b' * * @return string The raw path (i.e. not urldecoded) * @static */ public static function getBasePath() { //Method inherited from \Symfony\Component\HttpFoundation\Request return \Illuminate\Http\Request::getBasePath(); }
/** * @param Request $request * * @return \Illuminate\View\View */ public function index(Request $request) { $result = $this->entry->getPage($request->get('page', 1), 20)->setPath($request->getBasePath()); return view('admin.entry.index', ['page' => $result]); }