laravel-navigation
laravel-navigation copied to clipboard
feat: support rendering the current section
When using this package with Inertia, I often need the current section to display data related to the current page. Unfortunately, this is quite hard to achieve - I need to create a custom renderer in my application code.
This PR solves that problem by adding a new SectionRenderer
and a current
method on Navigation
, in order to render the section that is currently active.
Additionally, I updated the docs to add an example of this feature, and updated the previous examples to use Navigation::make()
instead of app(Navigation::class)
.
Could you take a look at this @sebastiandedeyne ?
Sorry to bother - may I kindly ask for this PR to be reviewed/merged? 😊
Looks good, thanks!