@extends('layouts.app') @section('title', $recipe->exists ? "Editer une recette" : "Créer une recette")@section('side_bar') @include('layouts.admin.side_bar_dashboard') @endsection @section('content')

@yield('title')

@csrf @if($recipe->exists) @method('PUT') @else @method('POST') @endif
@include ('shared.input', ['type' => 'text', 'name' => 'title', 'label' => 'Titre', 'value' => old('title', $recipe->title)]) @include ('shared.input', ['type' => 'text', 'name' => 'difficulty', 'label' => 'Difficulté', 'value' => old('difficulty', $recipe->difficulty)]) @include ('shared.input', ['type' => 'file', 'name' => 'image', 'label' => 'Image']) @include ('shared.input', ['type' => 'number', 'name' => 'preparation_time', 'label' => 'Temps de préparation (min)', 'value' => old('preparation_time', $recipe->preparation_time)]) @include ('shared.input', ['type' => 'number', 'name' => 'cooking_time', 'label' => 'Temps de cuisson (min)', 'value' => old('cooking_time', $recipe->cooking_time)]) @include ('shared.input', ['type' => 'number', 'name' => 'persons', 'label' => 'Nombre de personnes', 'value' => old('persons', $recipe->persons)])
Retour
@if($recipe->exists) @include('admin.ingredients.index', ['ingredients' => $recipe->ingredients]) @include('admin.stages.index', ['stages' => $recipe->stages]) @endif
@endsection