From 29c2adf109db0160f978a12f71fe9afe7b4e530d Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Thu, 7 Dec 2023 17:04:31 +0300 Subject: [PATCH] fixed fields plan --- app/Livewire/Plan/Create.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Livewire/Plan/Create.php b/app/Livewire/Plan/Create.php index dc73888..ad02c5d 100644 --- a/app/Livewire/Plan/Create.php +++ b/app/Livewire/Plan/Create.php @@ -85,16 +85,16 @@ class Create extends Component $plan = new Plan(); - $this->name = $plan->name; - $this->image = $plan->image->store('plans', 'public'); - $this->duration = $plan->duration; - $this->state = $plan->state; - $this->details = $plan->details; - $this->packets_count = $plan->packets_count; - $this->type = json_encode($plan->type); - $this->packet1_options = json_encode($plan->packet1_options); - $this->packet2_options = json_encode($plan->packet2_options); - $this->packet3_options = json_encode($plan->packet3_options); + $plan->name = $this->name; + $plan->image = $this->image->store('plans', 'public'); + $plan->duration = $this->duration; + $plan->state = $this->state; + $plan->details = $this->details; + $plan->packets_count = $this->packets_count; + $plan->type = json_encode($this->type); + $plan->packet1_options = json_encode($this->packet1_options); + $plan->packet2_options = json_encode($this->packet2_options); + $plan->packet3_options = json_encode($this->packet3_options); $plan->saveOrFail(); $user = Auth::user(); $user->author_of_plans()->attach($plan->id);