- Add password rotation: RotatePasswords console command + migration + service updates - Add PPSK management: UnifiPpsk model, migration, SyncPpskSchedules console - Add VLAN groups and AP groups: VlanGroupController, ApGroupController, model, migration - Add RebootAllAps console command - Add in_alert column to device states - Wire new features through service provider, routes, and existing controllers/services Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Dashboard\Unifi;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class UnifiServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
$this->mergeConfigFrom(__DIR__ . '/../config/unifi.php', 'unifi');
|
|
|
|
$this->app->singleton(Services\UnifiApiClient::class, function ($app) {
|
|
return new Services\UnifiApiClient();
|
|
});
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
$this->loadRoutesFrom(__DIR__ . '/routes/unifi.php');
|
|
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
|
|
|
|
if ($this->app->runningInConsole()) {
|
|
$this->commands([
|
|
Console\CheckWebhooks::class,
|
|
Console\CaptureSnapshots::class,
|
|
Console\CleanupSnapshots::class,
|
|
Console\RebootAllAps::class,
|
|
Console\RotatePasswords::class,
|
|
Console\SyncPpskSchedules::class,
|
|
]);
|
|
$this->publishes([
|
|
__DIR__ . '/../config/unifi.php' => config_path('unifi.php'),
|
|
], 'unifi-config');
|
|
}
|
|
}
|
|
}
|