recipe_edit complete

This commit is contained in:
2023-12-13 15:59:23 +03:00
parent 112cbbb82b
commit c682a7cb9c

View File

@@ -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();
}
}