URL segment using Laravel 4
Asked Answered
T

1

16

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?

Tide answered 7/6, 2013 at 5:9 Comment(0)
S
32

You need to use Larvel Request segment

Request::segment(1);
Starinsky answered 8/6, 2013 at 9:35 Comment(2)
@Jimbo Here's a link, look for "Retrieve A Request URI Segment" laravel.com/docs/requestsStarinsky
Here's Laravel 5 approach to use segment https://mcmap.net/q/210019/-laravel-request-all-should-not-be-called-staticallyBuna

© 2022 - 2024 — McMap. All rights reserved.