forked from eatvio/eatvio-infra
recipe_edit complete
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user