From 8037a21444d4fc3da204c85fad94508ddde0db8e Mon Sep 17 00:00:00 2001 From: Ashraf Monshi Date: Wed, 24 Aug 2022 16:15:17 +0300 Subject: [PATCH] abort if tag not exist --- src/Http/Livewire/Tags.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Http/Livewire/Tags.php b/src/Http/Livewire/Tags.php index 71a32de..cc1a3cc 100644 --- a/src/Http/Livewire/Tags.php +++ b/src/Http/Livewire/Tags.php @@ -16,6 +16,8 @@ public function mount($type, $slug) $this->type = $type; $this->slug = $slug; $this->tag = Tag::findBySlug($slug, $type); + + abort_if($this->tag === null, 404); } public function render()