Skip to content

Commit

Permalink
abort if tag not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Aug 24, 2022
1 parent 9075729 commit 8037a21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Http/Livewire/Tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8037a21

Please sign in to comment.