For the entities with a slug it would be helpful to change the default search from Laravel from id to the slug. Then this search would work:
// routes
Route::get('/quiz/{quiz}', [QuizController::class, 'edit']);
// Quiz model
public function getRouteKeyName()
{
return 'slug';
}
// controller
public function edit(Quiz $quiz)
{
dd($quiz);
}
For the entities with a slug it would be helpful to change the default search from Laravel from id to the slug. Then this search would work: