How to Get URL Segment in Laravel?

Today now in this post i will show you how to get url segment in laravel application. Whenever sometimes we need to get the current url segment then we can get this by using Request facade. Now here I will give you an example one for by using Request facade.

so from here you can get the segment from url and you will also know how we can use both of example.


	{{ Request::segment(1) }}

Read Also : How to convert Object into Array in PHP?

Thanks for read. I hope it help you. For more you can follow us on facebook.


About Shahriar Sagor

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Shahriar Sagor →