Setup Athena and Bolt
to install Athena, use the command:
php artisan athena:install
The install command will publish the migrations and all the necessary assets for the frontend.
if you prefere to run everything manually, here is what you need:
Migrations
1php artisan vendor:publish --tag=zeus-bolt-migrations2php artisan vendor:publish --tag=zeus-athena-migrations3php artisan vendor:publish --provider="BeyondCode\Comments\CommentsServiceProvider" --tag="migrations"
if you're using multi tenants, add the tenant columns to all tables
then, run the migration:
1php artisan migrate
Config
publish the configurations files:
1php artisan vendor:publish --tag=zeus-bolt-config2php artisan vendor:publish --tag=zeus-athena-config3php artisan vendor:publish --tag=zeus-config
assets:
1php artisan vendor:publish --tag=zeus-assets
Register Athena with Filament:
To set up the plugin with filament, you need to add it to your panel provider; The default one is adminPanelProvider
1->plugins([2 SpatieLaravelTranslatablePlugin::make()->defaultLocales([config('app.locale')]),3 BoltPlugin::make()4 ->extensions([5 \LaraZeus\Athena\Extensions\Athena::class,6 ]),7 AthenaPlugin::make(),8 \Saade\FilamentFullCalendar\FilamentFullCalendarPlugin::make()9])
Add trait to User Model
you need to add the trait to your User
model:
use \LaraZeus\Athena\Models\Concerns\BelongToAthena;
set the service manager
you can customize the service manager by implementing the method isServicesManager
1public function isServicesManager(): bool2{3 return str_ends_with($this->email, '@yourdomain.com');4}
customizing users list
to get the users list for services, yo can implement the method:
1public static function athenaUsers(): Collection | array2{3 return config('auth.providers.users.model')::query()->pluck(self::getAthenaUserFullNameAttribute(), 'id');4}