<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\RecipeController;
use App\Http\Controllers\Recipe2Controller;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

//  Route::get('/', function () {
//      return view('recipe_form');
//  });
Route::get('/recipe', [RecipeController::class, 'showForm']);
Route::post('/recipe', [RecipeController::class, 'generateRecipe']);

Route::get('/recipe2', [Recipe2Controller::class, 'showFormdata']);
Route::post('/recipe2', [Recipe2Controller::class, 'generateRecipe'])->name('recipe2.generate');
