http://www.someSite.com/name/john/lastname/doe
Route::get('/name/{name}/lastname{lastname}' , 'XXXController@getXXX');
Use :
Input::get('name');
and :
Input::get('lastname');
Example :
Route::get('/', function(){
echo Input::get('name');
echo Input::get('lastname');
});
xroot said:
Use :
Input::get('name');
and :
Input::get('lastname');
Example :
Route::get('/', function(){ echo Input::get('name'); echo Input::get('lastname'); });
Perfect, thank you
http://www.someSite.com?name=john&lastname=doe
Route::get('/', function() {
return Input::all();
});
xroot said:
Use :
Input::get('name');
and :
Input::get('lastname');
Example :
Route::get('/', function(){ echo Input::get('name'); echo Input::get('lastname'); });
Thank you for this answer really helpful :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community