Laravel error: Missing required parameters for route

You have to pass the route parameters to the route method, for example:

<li><a href="https://stackoverflow.com/questions/35259948/{{ route("user.profile', $nickname) }}">Profile</a></li>
<li><a href="https://stackoverflow.com/questions/35259948/{{ route("user.settings', $nickname) }}">Settings</a></li>

It’s because, both routes have a {nickname} in the route declaration. I’ve used $nickname for example but make sure you change the $nickname to appropriate value/variable, for example, it could be something like the following:

<li><a href="https://stackoverflow.com/questions/35259948/{{ route("user.settings', auth()->user()->nickname) }}">Settings</a></li>

Leave a Comment