Skip to content
Advertisement

Missing Required Parameters for Route in Laravel error

I am working with Laravel in this route :

Route::get('turnIn/{turnin}',"TurninController@index")->name('turnin.index');

and when calling the route :

{{ route('turnin.index', [$turnin])}}

Shows an error Missing required parameters for [Route: turnin.index] [URI: turnIn/{turnin}].

Advertisement

Answer

I figured it out, I was passing an array of objects instead of a single one “Turnin” this is why the route wasn’t accepting the parameters

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement