@filiberto
You can get the URL path one level below in Laravel by using the url()->current()
function and then applying dirname()
function to it.
Here is an example code snippet:
1 2 |
$currentUrl = url()->current(); $parentUrl = dirname($currentUrl); |
This code will get the current URL and then extract the parent URL path by going one level below.