Configuration
There is two different set of configuration, for filament, and for the frontend pages
Filament Configuration
to configure the plugin Bolt, you can pass the configuration to the plugin in adminPanelProvider
these all the available configuration, and their defaults values
Note
All these configurations are optional
1BoltPlugin::make() 2 // the default models, by default Bolt will read from the config file 'zeus-bolt'. 3 // but if you want to customize the models per panel, you can do it here 4 ->boltModels([ 5 // ... 6 'Category' => \App\Models\Bolt\Category::class, 7 'Collection' => \App\Models\Bolt\Collection::class, 8 'Field' => \App\Models\Bolt\Field::class, 9 'FieldResponse' => \App\Models\Bolt\FieldResponse::class,10 'Form' => \App\Models\Bolt\Form::class,11 'FormsStatus' => \App\Models\Bolt\FormsStatus::class,12 'Response' => \App\Models\Bolt\Response::class,13 'Section' => \App\Models\Bolt\Section::class,14 'User' => \App\Models\Staff::class,15 ])16 17 // make the actions floating in create and edit forms18 ->formActionsAreSticky(true)19 20 ->hideResources([21 FormResource::class22 ])23 24 ->globallySearchableAttributes([25 // you can return empty array to disable it26 FormResource::class => ['name']27 ])28 29 ->navigationGroupLabel('Bolt')30 31 ->hideNavigationBadges(resource: LaraZeus\Bolt\Resources::CollectionResource)32 ->showNavigationBadges(resource: LaraZeus\Bolt\Resources::CollectionResource)33 34 // if you have custom extension or using thunder35 ->extensions([36 \LaraZeus\Thunder\Extensions\Thunder::class,37 ])38,
Customize Filament Resources
you can customize all Bolt resources icons and sorting by adding the following code to your AppServiceProvider
boot method
1FormResource::navigationSort(100);2FormResource::navigationIcon('heroicon-o-home');3FormResource::navigationGroup('New Name');
Show or Hide Badges
To show all navigation badges (default)
1->showNavigationBadges()
To hide all navigation badges
1->hideNavigationBadges()
This will hide only the CollectionResource navigation badge
1->hideNavigationBadges(resource: LaraZeus\Bolt\Resources::CollectionResource)
This will show only the FormResource navigation badge
1->hideNavigationBadges()2->showNavigationBadges(resource: LaraZeus\Bolt\Resources::CollectionResource)
available resources:
- CategoryResource,
- CollectionResource,
- FormResource,
Frontend Configuration
use the file zeu-bolt.php
, to customize the frontend, like the prefix,domain, and middleware for each content type.
to publish the configuration:
1php artisan vendor:publish --tag=zeus-bolt-config
Custom User Model:
By default Bolt will use the default Laravle user model to get the user info:
config('auth.providers.users.model')
if you need to change this to use another model, add the following in your config file: zeus-bolt.php
:
1'models' => [2 //...3 'User' => AnotherUserModel::class,4],