From 50564524460ce4cca5f6abe4efdb93560b2a678e Mon Sep 17 00:00:00 2001 From: Harvey Christian Pacleb Date: Wed, 1 Oct 2025 11:03:22 +0800 Subject: [PATCH 1/2] fix: Use gate denies instead for readability --- src/Html/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Html/Builder.php b/src/Html/Builder.php index 4953d53..5c9546e 100644 --- a/src/Html/Builder.php +++ b/src/Html/Builder.php @@ -267,7 +267,7 @@ public function addScript(string $view): static public function addScriptIfCannot(string $ability, string $view): static { - if (! (Gate::allows($ability))) { + if (Gate::allows($ability)) { $this->addScript($view); } From 44d8e33e0257130d604f222efad812090867842c Mon Sep 17 00:00:00 2001 From: Harvey Christian Pacleb Date: Wed, 1 Oct 2025 11:04:18 +0800 Subject: [PATCH 2/2] fix: Use gate denies instead for readability --- src/Html/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Html/Builder.php b/src/Html/Builder.php index 5c9546e..ed537c9 100644 --- a/src/Html/Builder.php +++ b/src/Html/Builder.php @@ -267,7 +267,7 @@ public function addScript(string $view): static public function addScriptIfCannot(string $ability, string $view): static { - if (Gate::allows($ability)) { + if (Gate::denies($ability)) { $this->addScript($view); }