is_mood_fillable = $this->user->detailz->is_mood_fillable; $this->is_bedtime_fillable = $this->user->detailz->is_bedtime_fillable; $this->publicity = $this->user->is_public_profile; } public function render() { return view('livewire.profile.show-detailz'); } public function editAction() { return redirect()->route('user_detailz.edit', $this->userDetailz->id); } public function updated($name, $value): void { if($name == 'is_bedtime_fillable') { $this->user->detailz->update(['is_bedtime_fillable' => $value]); Toaster::info('Bedtime updated!'); } if($name == 'is_mood_fillable') { $this->user->detailz->update(['is_mood_fillable' => $value]); Toaster::info('Mood updated!'); } if($name == "publicity") { $this->user->update(['is_public_profile' => $value]); Toaster::info('Publicity updated!'); } } }