Download the PHP package markrassamni/nova-resource-landing-page without Composer
On this page you can find all versions of the php package markrassamni/nova-resource-landing-page. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download markrassamni/nova-resource-landing-page
More information about markrassamni/nova-resource-landing-page
Files in markrassamni/nova-resource-landing-page
Package nova-resource-landing-page
Short Description Decide if a resource should open on the index, create, update, or detail page
License MIT
Homepage https://github.com/markrassamni/nova-resource-landing-page
Informations about the package nova-resource-landing-page
Laravel Nova: Resource Landing Page
Adds the ability to create a navigation link directly to the detail, create, or edit page of a resource.
Prerequisites
Installation
Modify app/Nova/Resource.php
to implement ResourceLandingPageInterface
and the SupportChangeResourceLandingPage
trait:
Publish assets:
Update
When updating it is important to republish the assets, like so:
Uninstallation
Remove from composer
Remove SupportChangeResourceLandingPage
trait from your Nova Resources
Remove the customized navigation template
Usage
Place the following method on models that should land on the detail page.
Place the following method on models that should land on the create page.
Place the following method on models that should land on the edit page.
Optionally override the resource identifier when opening the detail or edit page.
How it works
Laravel Nova has the ability to override the Blade template used to render the navigation sidebar.
The template is copied from Nova version v3.4.1 and altered with a few lines to support linking a resource directly to the detail view.
When publishing vendor assets with the tag nova-views
the template will be placed in the project resources/views/vendor/nova/resources
folder.