fix: add missing Admin controllers, fix __DIR__ paths (3 levels), defensive ServiceProvider
This commit is contained in:
@@ -26,7 +26,7 @@ class AddonServiceProvider extends ServiceProvider
|
||||
{
|
||||
// Merge addon config (won't overwrite user's published config)
|
||||
$this->mergeConfigFrom(
|
||||
__DIR__ . '/../../config/advanced-admin.php',
|
||||
__DIR__ . '/../../../config/advanced-admin.php',
|
||||
'advanced-admin'
|
||||
);
|
||||
|
||||
@@ -43,8 +43,8 @@ class AddonServiceProvider extends ServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
// ── Routes ────────────────────────────────────────────────────────────
|
||||
$clientRoutes = __DIR__ . '/../../routes/addon-client.php';
|
||||
$appRoutes = __DIR__ . '/../../routes/addon-application.php';
|
||||
$clientRoutes = __DIR__ . '/../../../routes/addon-client.php';
|
||||
$appRoutes = __DIR__ . '/../../../routes/addon-application.php';
|
||||
|
||||
if (file_exists($clientRoutes)) {
|
||||
$this->loadRoutesFrom($clientRoutes);
|
||||
@@ -54,7 +54,7 @@ class AddonServiceProvider extends ServiceProvider
|
||||
}
|
||||
|
||||
// ── Migrations ────────────────────────────────────────────────────────
|
||||
$migrationsPath = __DIR__ . '/../../database/migrations/addon';
|
||||
$migrationsPath = __DIR__ . '/../../../database/migrations/addon';
|
||||
if (is_dir($migrationsPath)) {
|
||||
$this->loadMigrationsFrom($migrationsPath);
|
||||
}
|
||||
@@ -129,11 +129,11 @@ class AddonServiceProvider extends ServiceProvider
|
||||
|
||||
// ── Publishable Assets ────────────────────────────────────────────────
|
||||
$this->publishes([
|
||||
__DIR__ . '/../../config/advanced-admin.php' => config_path('advanced-admin.php'),
|
||||
__DIR__ . '/../../../config/advanced-admin.php' => config_path('advanced-admin.php'),
|
||||
], 'advanced-admin-config');
|
||||
|
||||
$this->publishes([
|
||||
__DIR__ . '/../../config/addon-commands' => base_path('config/addon-commands'),
|
||||
__DIR__ . '/../../../config/addon-commands' => base_path('config/addon-commands'),
|
||||
], 'advanced-admin-commands');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user