blockDate = today()->format('Y-m-d'); $this->blockStartTime = '09:00'; $this->blockEndTime = '10:00'; $this->blockReason = ''; $this->resetValidation(); $this->showBlockModal = true; } public function closeBlockModal(): void { $this->showBlockModal = false; $this->reset(['blockDate', 'blockStartTime', 'blockEndTime', 'blockReason']); $this->resetValidation(); } public function blockTimeSlot(): void { $this->validate(); BlockedTime::create([ 'block_date' => $this->blockDate, 'start_time' => $this->blockStartTime, 'end_time' => $this->blockEndTime, 'reason' => $this->blockReason ?: null, ]); $this->closeBlockModal(); session()->flash('block_success', __('widgets.time_slot_blocked')); } }; ?>