mardi 27 novembre 2018

Laravel $request->input('var') returns null in Controller

//routes

Route::get('/section/{id}', 'Controller@section');

//controller

public function section(Request $request) {
  $id = $request->input('id');
  dd($id);
}

//output

null

  1. there is no problem to retrieve $id, if I try to retrieve inside Route through function($id){}.
  2. no other kind of errors shown.

Thank you.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2r6iD9B
via IFTTT

Aucun commentaire:

Enregistrer un commentaire