group(function () { Route::get('/', function () { return view('tips.index', ['tips' => Tip::all()]); })->name('tip.index'); Route::get('/tips/{tip}', function (Tip $tip) { return view('tips.show', compact('tip')); })->name('tip.show'); Route::get('/threads/{thread}', function (Thread $thread) { return view('threads.show', [ 'thread' => $thread, 'tips' => $thread->tips, ]); })->name('thread.show'); });