2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
2017-11-04 19:21:30 +00:00
|
|
|
use Pterodactyl\Models\User;
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
use Pterodactyl\Models\Subuser;
|
2017-09-25 03:34:30 +00:00
|
|
|
use Illuminate\Support\Facades\Schema;
|
2015-12-06 18:58:49 +00:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
2017-11-04 19:21:30 +00:00
|
|
|
use Pterodactyl\Observers\UserObserver;
|
|
|
|
use Pterodactyl\Observers\ServerObserver;
|
|
|
|
use Pterodactyl\Observers\SubuserObserver;
|
2015-12-06 18:58:49 +00:00
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
2017-09-25 03:34:30 +00:00
|
|
|
Schema::defaultStringLength(191);
|
|
|
|
|
2017-11-04 19:21:30 +00:00
|
|
|
User::observe(UserObserver::class);
|
|
|
|
Server::observe(ServerObserver::class);
|
|
|
|
Subuser::observe(SubuserObserver::class);
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|
|
|
|
|
2017-12-30 22:33:00 +00:00
|
|
|
/**
|
|
|
|
* 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);
|
|
|
|
}
|
2017-04-28 02:28:01 +00:00
|
|
|
}
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|