From 506f1409b352b59545d19f44b2cd5c8dec1fb4a2 Mon Sep 17 00:00:00 2001 From: LT Date: Wed, 15 Jan 2025 19:42:28 +0300 Subject: [PATCH] fix: After response callback fix --- src/Traits/Resource/ResourceCrudRouter.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Traits/Resource/ResourceCrudRouter.php b/src/Traits/Resource/ResourceCrudRouter.php index b37c9f6..d9199ed 100644 --- a/src/Traits/Resource/ResourceCrudRouter.php +++ b/src/Traits/Resource/ResourceCrudRouter.php @@ -84,10 +84,14 @@ public function getDetailPageUrl( */ public function getFragmentLoadUrl( string|array $fragment, - PageContract $page, - DataWrapperContract|int|string|null $key, + ?PageContract $page = null, + DataWrapperContract|int|string|null $key = null, array $params = [] ): string { + if(is_null($page)) { + $page = $this->getIndexPage(); + } + return $this->getPageUrl( $page, params: array_filter([