mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 19:14:45 +02:00
Simplification
This commit is contained in:
parent
ab4c3eedc3
commit
e7316ba973
@ -73,8 +73,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function register(): void
|
public function register(): void
|
||||||
{
|
{
|
||||||
// Only load the settings service provider if the environment
|
// Only load the settings service provider if the environment is configured to allow it.
|
||||||
// is configured to allow it.
|
|
||||||
if (!config('panel.load_environment_only', false) && $this->app->environment() !== 'testing') {
|
if (!config('panel.load_environment_only', false) && $this->app->environment() !== 'testing') {
|
||||||
$this->app->register(SettingsServiceProvider::class);
|
$this->app->register(SettingsServiceProvider::class);
|
||||||
}
|
}
|
||||||
@ -82,8 +81,6 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
$this->app->singleton('extensions.themes', function () {
|
$this->app->singleton('extensions.themes', function () {
|
||||||
return new Theme();
|
return new Theme();
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->registerAuth();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -130,9 +127,4 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
return (int) $user->id === (int) $userId;
|
return (int) $user->id === (int) $userId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerAuth(): void
|
|
||||||
{
|
|
||||||
Sanctum::ignoreMigrations();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user