how to get url segments count in laravel 5?
The Request object has a function that returns all segments, place that in a count()
to get the number you seek:
$totalSegsCount = count(Request::segments());
The Request object has a function that returns all segments, place that in a count()
to get the number you seek:
$totalSegsCount = count(Request::segments());