diff --git a/resources/views/recipes/edit.blade.php b/resources/views/recipes/edit.blade.php index 552eead..f400770 100644 --- a/resources/views/recipes/edit.blade.php +++ b/resources/views/recipes/edit.blade.php @@ -100,29 +100,19 @@

Steps

- @php($step_number = 0) -
+
@if(old('steps')) - @foreach(old('steps') as $i => $step) + @foreach(old('steps') as $i => $step_default) @if (empty($step)) @continue @endif -
-
{{ $step_number++ }}
- -
+ @include('recipes.partials.step-input') @endforeach @else @foreach($recipe->steps as $step) -
-
{{ $step_number++ }}
- -
+ @include('recipes.partials.step-input', ['step_default' => $step->step]) @endforeach @endif diff --git a/resources/views/recipes/partials/step-input.blade.php b/resources/views/recipes/partials/step-input.blade.php new file mode 100644 index 0000000..16a9e29 --- /dev/null +++ b/resources/views/recipes/partials/step-input.blade.php @@ -0,0 +1,9 @@ +
+
#
+ + + + + + +