@php($title = ($recipe->exists ? "Edit {$recipe->name}" : 'Add Recipe')) {{ $title }}

{{ $title }}

@if ($recipe->exists)@method('put')@endif @csrf
@if($recipe->hasMedia())
Current image
{{ $recipe->getFirstMedia()('preview') }}
@endif
@if($recipe->hasMedia()) @else @endif

Ingredients

@forelse($ingredients as $ingredient) @include('recipes.partials.ingredient-input', $ingredient) @empty @include('recipes.partials.ingredient-input') @endforelse

Steps

@forelse($steps as $step) @include('recipes.partials.step-input', $step) @empty @include('recipes.partials.step-input') @endforelse
{{ ($recipe->exists ? 'Save' : 'Add') }}
@once @push('styles') @endpush @endonce @once @push('scripts') @endpush @endonce