In this URL: http://siteName/html/test
I want to catch test
, of course inside the route.
This works great:
Route::get('test', function()
{
return Route::getCurrentRoute()->getPath();
});
But I want to access the path outside of any route and in my route.php
file like this:
// routes.php
return Route::getCurrentRoute()->getPath();
Route::get('test', function()
{
...
});