You should define that route before your call Route::resource
Docs: https://laravel.com/docs/8.x/controllers#restful-supplementing-resource-controllers
Then clear routes
php artisan route:clear
And check what you have with
php artisan route:list
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Web Route
route::name('students.')->middleware('auth')->group(function(){
Route::resource('quiz', 'ResultController');
Route::get('quiz/create/{id}', [
'as' => 'quiz',
'uses' => 'ResultController@createFromHomework'
]);
});
Controller
public function createFromHomework($id)
{
return 'inside';
}
View
<a href="{{ route('students.quiz', ['id'=>$homework->id]) }} " class="btn btn-primary">{{$homework->name}} </a>
returning error like
Missing required parameters for [Route: students.quiz] [URI: quiz/create/{id}].
please help.
@michaloravec, Michal, SORRY... it was a grave mistake.
the error was saying in my app.blade. it was a route in the navigation I didn't change yet.
so sorry, and ty for your time.. it's all good. it was all my careless. lol
Please or to participate in this conversation.