WIP recipe

This commit is contained in:
Anatoliy Poloz
2023-12-12 14:06:49 +03:00
parent ee3897a1a3
commit fc41cc7106
22 changed files with 3796 additions and 159 deletions

View File

@@ -63,7 +63,13 @@ class Edit extends Component
public function addIngredient()
{
$this->ingredients[] = ['name' => '', 'portion' => ''];
// $this->ingredients[] = ['name' => '', 'portion' => ''];
$this->ingredients[] = [
'name' => $this->ingredients_name,
'portion' => $this->ingredients_portion,
'unit' => $this->ingredients_unit
];
$this->reset('ingredients_name', 'ingredients_portion', 'ingredients_unit');
}
public function removeIngredient($i)
@@ -135,6 +141,7 @@ class Edit extends Component
public function publish()
{
dd($this->steps);
$this->validate();
$recipe = $this->recipe;