From 9516f877f63452b6db47f49df0c655f21c3fa423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 13 Jan 2021 13:39:34 +0100 Subject: [PATCH] Skip showing the page if no fields --- app/Http/Livewire/RequiredClientInfo.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Livewire/RequiredClientInfo.php b/app/Http/Livewire/RequiredClientInfo.php index c325704ec5dd..c68b1ef35416 100644 --- a/app/Http/Livewire/RequiredClientInfo.php +++ b/app/Http/Livewire/RequiredClientInfo.php @@ -139,7 +139,9 @@ class RequiredClientInfo extends Component public function render() { - $this->checkFields(); + count($this->fields) > 0 + ? $this->checkFields() + : $this->show_form = false; return render('components.livewire.required-client-info'); }