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);