Support the ongoing development of Laravel.io →
posted 7 years ago
Requests
Last updated 10 months ago.
0

I don't understand why you need to get values in route file.

In my case, I get those kind of parameters in Controllers.

$user_name = Input::get('name');
$age = Input::get('age');

Route file:

Route::get('people.php', array('as' => 'people', 'uses' => '[email protected]'));

or you may configure the url like this.

people.php/Joe/24
Route::get('people.php/{username}/{age}', array('as' => 'people/username/age', 'uses' => '[email protected]'));

How's that? You may select one of my suggestions.

0

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

mehmet mehmet Joined 18 May 2014

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.

© 2023 Laravel.io - All rights reserved.