URL segment using Laravel 4

johncena picture johncena · Jun 7, 2013 · Viewed 18.6k times · Source

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?

Answer

Safeer picture Safeer · Jun 8, 2013

You need to use Larvel Request segment

Request::segment(1);