---
name: zeus-athena
description: Use when installing, configuring, or customizing lara-zeus/athena appointments, services, timeslot bookings, calendar, and Bolt integration.
---

# Lara Zeus Athena (`lara-zeus/athena`)

## Overview & Requirements
`lara-zeus/athena` is a paid Filament appointments and service booking plugin powered by `lara-zeus/bolt` forms and `saade/filament-fullcalendar`.
- **PHP**: `^8.4` (with `sqlite` PHP extension enabled per docs)
- **Dependencies**: `lara-zeus/bolt` (`^5.0`), `lara-zeus/quantity` (`^3.0`), `lara-zeus/replies` (`^3.0`), `saade/filament-fullcalendar` (`^5.0`)

## Installation
Configure the Lara Zeus private Satis repository and license credentials in `auth.json` (from your `https://larazeus.com/dashboard` account):
```bash
composer config repositories.larazeus composer https://larazeus.com/satis
composer require lara-zeus/athena
php artisan athena:install
```
`php artisan athena:install` publishes `zeus-bolt-migrations`, `zeus-athena-migrations`, `zeus-replies-migrations`, configs (`zeus-bolt-config`, `zeus-athena-config`, `zeus-config`, `zeus-replies-config`), and `zeus-assets`, then optionally runs `php artisan migrate`.

## Configuration & Migrations
Published migrations: `create_services_table`, `create_requests_table`, `create_requests_periods_table`, `create_tmp_time_lock_table`.
Key options in `config/zeus-athena.php`:
- `domain` (`null`), `prefix` (`'athena'`), `table-prefix` (`'athena_'`), `middleware` (`['web']`)
- `models`: `RequestPeriods`, `Request`, `Service`, `TimeLock`, `User`
- `enums`: `RequestStatus` (`LaraZeus\Athena\Enums\RequestStatus::class`)
- `appointment-no`: `LaraZeus\Athena\Support\AppointmentNo::class`

## Filament Panel Registration
Register Athena alongside Bolt, SpatieTranslatable, and FullCalendar in your `PanelProvider`:
```php
use LaraZeus\Athena\AthenaPlugin;
use LaraZeus\Athena\Extensions\Athena;
use LaraZeus\Bolt\BoltPlugin;
use LaraZeus\SpatieTranslatable\SpatieTranslatablePlugin;
use Saade\FilamentFullCalendar\FilamentFullCalendarPlugin;

->plugins([
    SpatieTranslatablePlugin::make()->defaultLocales([config('app.locale')]),
    BoltPlugin::make()
        ->extensions([
            Athena::class,
        ]),
    AthenaPlugin::make()
        ->models([
            'Service' => \LaraZeus\Athena\Models\Service::class,
            'Request' => \LaraZeus\Athena\Models\Request::class,
            'RequestPeriods' => \LaraZeus\Athena\Models\RequestPeriods::class,
            'TimeLock' => \LaraZeus\Athena\Models\TimeLock::class,
        ])
        ->enums([
            'RequestStatus' => \LaraZeus\Athena\Enums\RequestStatus::class,
        ])
        ->navigationGroupLabel('Athena'),
    FilamentFullCalendarPlugin::make(),
])
```

## Core Usage & Examples

### 1. User Model Trait
Add `BelongToAthena` to your `User` model and customize manager access:
```php
use LaraZeus\Athena\Models\Concerns\BelongToAthena;

class User extends Authenticatable
{
    use BelongToAthena;

    public function isServicesManager(): bool
    {
        return str_ends_with($this->email, '@yourdomain.com');
    }
}
```

### 2. Frontend Routes, Embedding & Events
- **Routes** (`routes/web.php` under `zeus-athena.prefix`, default `/athena`):
  - `athena.services.list` (`/`), `athena.service.show` (`/{service:slug}`)
  - `athena.requests.list` (`/requests`, `auth`), `athena.request.show` (`/request/{requestNo}`, `auth`)
- **Embed a service form**: `<livewire:bolt.fill-form slug="feedback" extensionSlug="car-wash" inline="true" />`
- **Event**: Listen to `LaraZeus\Athena\Events\AppointmentCreated` (receives `public Request $request`).

## Common Pitfalls
- **Missing Bolt extension**: Failing to pass `LaraZeus\Athena\Extensions\Athena::class` to `BoltPlugin::make()->extensions([...])` prevents linking Bolt forms to Athena services.
- **Missing `FilamentFullCalendarPlugin`**: Omitting `FilamentFullCalendarPlugin::make()` breaks the Athena `Calendar` page and `CalendarWidget`.
- **Default `isServicesManager()`**: Leaving `BelongToAthena::isServicesManager()` unoverridden checks for `@yourdomain.com`.
- **Incorrect model setter**: Use `->models([...])` on `AthenaPlugin`, not `->skyModels([...])`.
