39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
use Pterodactyl\Models\User;
|
|
use Pterodactyl\Models\Server;
|
|
use Pterodactyl\Models\Subuser;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Pterodactyl\Observers\UserObserver;
|
|
use Pterodactyl\Observers\ServerObserver;
|
|
use Pterodactyl\Observers\SubuserObserver;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot()
|
|
{
|
|
Schema::defaultStringLength(191);
|
|
|
|
User::observe(UserObserver::class);
|
|
Server::observe(ServerObserver::class);
|
|
Subuser::observe(SubuserObserver::class);
|
|
}
|
|
|
|
/**
|
|
* Register application service providers.
|
|
*/
|
|
public function register()
|
|
{
|
|
// Only load the settings service provider if the environment
|
|
// is configured to allow it.
|
|
if (! config('pterodactyl.load_environment_only', false) && $this->app->environment() !== 'testing') {
|
|
$this->app->register(SettingsServiceProvider::class);
|
|
}
|
|
}
|
|
}
|