Skip to content

Commit

Permalink
fix page when modal is false
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Oct 26, 2024
1 parent 0b68bf0 commit c664781
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpstan/phpstan-phpunit": "^1.4"
}
},
"version": "v2.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getActions(): array
->model(method_exists(self::$page, 'getModel') ? self::$page->getModel() : null)
->modelLabel(method_exists(self::$page, 'getModelLabel') ? get_model_label(self::$page->getModel()) : null)
->form(fn (Form $form) => app(self::$page->getResource())::form($form))
->url(fn () => isset(app(self::$page->getResource())::getPages()[$action->getName()]) ? app(app(self::$page->getResource())::getPages()[$action->getName()]->getPage())->getUrl() : null);
->url(fn () => isset(app(self::$page->getResource())::getPages()[$action->getName()]) ? app(app(self::$page->getResource())::getPages()[$action->getName()]->getPage())->getUrl(['record' => method_exists(self::$page, 'getRecord') ? self::$page->getRecord() : null]) : null);
}

return $action;
Expand Down

0 comments on commit c664781

Please sign in to comment.