Interactive setup wizard.
php artisan hmac:install [--force]Publishes config, runs migrations, optionally generates first credentials.
Generate new credentials.
php artisan hmac:generate [--tenant=1] [--environment=testing] [--expires=30] [--user=1]| Option | Description | Default |
|---|---|---|
--tenant |
Tenant ID (required only when tenancy enabled) | - |
--environment |
production or testing |
testing |
--expires |
Days until expiration | Never |
--user |
User ID who creates credential | 1 |
Rotate a secret with grace period.
php artisan hmac:rotate <client_id> [--grace-days=7]Both old and new secrets work during grace period.
Remove old request logs.
php artisan hmac:cleanup [--days=30] [--dry-run]// routes/console.php (Laravel 11+)
Schedule::command('hmac:cleanup --days=30')->daily()->at('03:00');Artisan::call('hmac:generate', ['--environment' => 'production', '--user' => 1]);