How can I implement a segment based url in laravel 4? I tried using it in laravel 3 like URI::segment(1) and it works. I converted my website using laravel 4 but the URI::segment(1) got an error. Any help?
Asked
Active
Viewed 1.9k times
1 Answers
32
You need to use Larvel Request segment
Request::segment(1);
-
3@Jimbo Here's a link, look for "Retrieve A Request URI Segment" http://laravel.com/docs/requests – Safeer Jun 08 '13 at 19:04
-
Here's Laravel 5 approach to use segment http://stackoverflow.com/a/28574016/165084 – Antonio Max Jul 25 '15 at 05:05