lara-zeus / bolt

form builder for your users, with so many use cases
https://larazeus.com/bolt
MIT License
187 stars 33 forks source link

Add configuration options for navigation badges #237

Closed Edsardio closed 9 months ago

Edsardio commented 9 months ago

To start off, just like you mentioned in Discord, naming variables isn't my strongest suit.

This adds a configuration option for the navigation badges. I created an Enum so people will be able to disable the navigation badges for specific resources if desired instead of just all of them.

Some examples:

This will hide all navigation badges

BoltPlugin::make()
    ->hideNavigationBadges()

This will show all navigation badges (default)

BoltPlugin::make()
    ->showNavigationBadges()

This will hide only the CollectionResource navigation badge

BoltPlugin::make()
    ->hideNavigationBadges(resource: LaraZeus\Bolt\Resources::CollectionResource)

This will show only the FormResource navigation badge

BoltPlugin::make()
    ->hideNavigationBadges()
    ->showNavigationBadges(resource: LaraZeus\Bolt\Resources::CollectionResource)

If you have any questions or want anything changed just let me know!

Edsardio commented 9 months ago

Apparently while removing my editors auto code style formatting I was a bit too careless and accidentally removed the properties in the configuration class, added those again in the last commit.

atmonshi commented 9 months ago

Thank you @Edsardio so much all looks good, will release it soon