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
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 confusedIs 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
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community