name('home'); Route::get('/recipes', [RecipeController::class, 'index'])->name('recipes.index'); Route::get('/recipes/{slug}', [RecipeController::class, 'show'])->name('recipes.show'); // User dashboard Route::get('/dashboard', function () { return view('dashboard'); })->middleware(['auth', 'verified'])->name('dashboard'); // Authenticated routes Route::middleware('auth')->group(function () { // Profile Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit'); Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update'); Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy'); // Recipe interactions Route::post('/recipes/{recipe}/favorite', [RecipeController::class, 'toggleFavorite'])->name('recipes.favorite'); Route::post('/recipes/{recipe}/rate', [RecipeController::class, 'rate'])->name('recipes.rate'); Route::post('/recipes/{recipe}/comment', [RecipeController::class, 'comment'])->name('recipes.comment'); }); require __DIR__.'/auth.php';