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
php artisan vendor:publish --tag=zeus-bolt-migrationsphp artisan vendor:publish --tag=zeus-athena-migrationsphp 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:
php artisan migrate
Config
publish the configurations files:
php artisan vendor:publish --tag=zeus-bolt-configphp artisan vendor:publish --tag=zeus-athena-configphp artisan vendor:publish --tag=zeus-config
assets:
php 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
->plugins([ SpatieLaravelTranslatablePlugin::make()->defaultLocales([config('app.locale')]), BoltPlugin::make() ->extensions([ \LaraZeus\Athena\Extensions\Athena::class, ]), AthenaPlugin::make(), \Saade\FilamentFullCalendar\FilamentFullCalendarPlugin::make()])
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
public function isServicesManager(): bool{ return str_ends_with($this->email, '@yourdomain.com');}
customizing users list
to get the users list for services, yo can implement the method:
public static function athenaUsers(): Collection | array{ return config('auth.providers.users.model')::query()->pluck(self::getAthenaUserFullNameAttribute(), 'id');}