diff --git a/app/Livewire/Recipe/Edit.php b/app/Livewire/Recipe/Edit.php index 145dce8..b2f0127 100644 --- a/app/Livewire/Recipe/Edit.php +++ b/app/Livewire/Recipe/Edit.php @@ -24,6 +24,9 @@ class Edit extends Component public $description = ""; public $steps = [['image' => '', 'description' => '']]; public $ingredients = [['name' => '', 'portion' => '']]; + public $ingredients_name = ""; + public $ingredients_portion = ""; + public $ingredients_unit = "gr"; protected $listeners = ['stepRemoved' => '$refresh', 'parentComponentTagAdded', 'parentComponentTagRemoved']; @@ -147,7 +150,6 @@ class Edit extends Component public function publish() { - dd($this->steps); $this->validate(); $recipe = $this->recipe; @@ -166,7 +168,7 @@ class Edit extends Component $recipe->save(); - return redirect()->route('recipe.show', $recipe->id); + return redirect()->back(); } }