I have a url : http://localhost:8888/projects/oop/2
http://localhost:8888/projects/oop/2
I want to access the first segment --> projects
projects
I\'ve tried
Here is code you can get url segment.
{{ Request::segment(1) }}
If you don't want the data to be escaped then use {!! !!} else use {{ }}.
{!! Request::segment(1) !!}
https://laravel.com/docs/4.2/requests