From 962005b46e90b4605b6bba2a8bb57662b81ea950 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Sun, 24 Nov 2024 13:18:54 +0700 Subject: [PATCH 1/3] Add PHP8.4 support --- src/BladeRouteGenerator.php | 2 +- src/Ziggy.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BladeRouteGenerator.php b/src/BladeRouteGenerator.php index 1775a6e0..ace0bc8b 100644 --- a/src/BladeRouteGenerator.php +++ b/src/BladeRouteGenerator.php @@ -9,7 +9,7 @@ class BladeRouteGenerator { public static $generated; - public function generate($group = null, string $nonce = null): string + public function generate(array|string|null $group = null, ?string $nonce = null): string { $ziggy = new Ziggy($group); diff --git a/src/Ziggy.php b/src/Ziggy.php index fd121752..dc477c21 100644 --- a/src/Ziggy.php +++ b/src/Ziggy.php @@ -24,7 +24,7 @@ class Ziggy implements JsonSerializable protected Collection $routes; public function __construct( - protected $group = null, + protected array|string|null $group = null, protected ?string $url = null, ) { $this->url = rtrim($url ?? url('/'), '/'); From 7ac4f09e22826d19a2e8db33c072312c28cd7f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ng=C3=B4=20Qu=E1=BB=91c=20=C4=90=E1=BA=A1t?= Date: Thu, 28 Nov 2024 17:55:11 +0700 Subject: [PATCH 2/3] Update src/BladeRouteGenerator.php --- src/BladeRouteGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BladeRouteGenerator.php b/src/BladeRouteGenerator.php index ace0bc8b..9a9bc703 100644 --- a/src/BladeRouteGenerator.php +++ b/src/BladeRouteGenerator.php @@ -9,7 +9,7 @@ class BladeRouteGenerator { public static $generated; - public function generate(array|string|null $group = null, ?string $nonce = null): string + public function generate($group = null, ?string $nonce = null): string { $ziggy = new Ziggy($group); From 8f5afd3e5501927cec132cedb242f83d43e7b855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ng=C3=B4=20Qu=E1=BB=91c=20=C4=90=E1=BA=A1t?= Date: Thu, 28 Nov 2024 17:55:17 +0700 Subject: [PATCH 3/3] Update src/Ziggy.php --- src/Ziggy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ziggy.php b/src/Ziggy.php index dc477c21..fd121752 100644 --- a/src/Ziggy.php +++ b/src/Ziggy.php @@ -24,7 +24,7 @@ class Ziggy implements JsonSerializable protected Collection $routes; public function __construct( - protected array|string|null $group = null, + protected $group = null, protected ?string $url = null, ) { $this->url = rtrim($url ?? url('/'), '/');