Support the ongoing development of Laravel.io →
Requests Input Forms
Last updated 1 year ago.
0

Can you tell us what you tried or what you are confused about?

The docs can be found here: https://laravel.com/docs/5.3/routing

0

moschel26 said:

My url is like this : http://localhost/mysystem/public/users/index/2016

I want to get 2016, because I need it. But, I'm confused

Is there any people who can help me?

the url you shared seems a bit weird but okay. i'm assuming you have users controller and an index method...

// route
Route::get('users/{year}', 'UserController@index');

// controller
public function index($year)
{
  // you should be able to access the value of the querystring via $year
}
Last updated 7 years ago.
0

did you try with segment?

$request->segment(5);
0

Sign in to participate in this thread!

Eventy

Your banner here too?

moschel26 moschel26 Joined 21 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.