lundi 9 novembre 2015

How to pass laravel 5.1 route.php values to the controller?

I'm having trouble adding more then 1 parameter to my route.

here's my code:

Route::get('/setage/{dogid}/{value}', [
'as' => 'setage', 'uses' => 'DogController@setage'
]);

I want to set the age of a dog to a certain value, so this link would look like: http://localhost:8000/setage/3/5

  1. Is it possible?
  2. Should I use post instead of get?
  3. Why am I getting an error saying the route wasn't found?


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire