Missing Required Parameters for Route in Laravel error

Tags: , ,

I am working with Laravel in this route :


and when calling the route :

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

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


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

Source: stackoverflow