Support the ongoing development of Laravel.io →
posted 9 years ago
Requests
Last updated 2 years 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' => 'ExtraController@xfunction'));

or you may configure the url like this.

people.php/Joe/24
Route::get('people.php/{username}/{age}', array('as' => 'people/username/age', 'uses' => 'ExtraController@xfunction'));

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

0

Sign in to participate in this thread!

Eventy

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.

© 2024 Laravel.io - All rights reserved.