Skip to content

Commit 6a2cb72

Browse files
committed
Fix debug bar getting loaded in production
1 parent 167b22a commit 6a2cb72

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<?php
2-
/**
3-
* Pterodactyl - Panel
4-
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5-
*
6-
* This software is licensed under the terms of the MIT license.
7-
* https://opensource.org/licenses/MIT
8-
*/
92

103
namespace Pterodactyl\Providers;
114

125
use View;
136
use Cache;
14-
use Pterodactyl\Models;
15-
use Pterodactyl\Observers;
7+
use Pterodactyl\Models\User;
8+
use Pterodactyl\Models\Server;
9+
use Pterodactyl\Models\Subuser;
1610
use Illuminate\Support\Facades\Schema;
1711
use Illuminate\Support\ServiceProvider;
12+
use Pterodactyl\Observers\UserObserver;
13+
use Pterodactyl\Observers\ServerObserver;
14+
use Pterodactyl\Observers\SubuserObserver;
15+
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
16+
use DaneEveritt\LoginNotifications\NotificationServiceProvider;
17+
use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider;
1818

1919
class AppServiceProvider extends ServiceProvider
2020
{
@@ -25,9 +25,9 @@ public function boot()
2525
{
2626
Schema::defaultStringLength(191);
2727

28-
Models\User::observe(Observers\UserObserver::class);
29-
Models\Server::observe(Observers\ServerObserver::class);
30-
Models\Subuser::observe(Observers\SubuserObserver::class);
28+
User::observe(UserObserver::class);
29+
Server::observe(ServerObserver::class);
30+
Subuser::observe(SubuserObserver::class);
3131

3232
View::share('appVersion', $this->versionData()['version'] ?? 'undefined');
3333
View::share('appIsGit', $this->versionData()['is_git'] ?? false);
@@ -39,11 +39,12 @@ public function boot()
3939
public function register()
4040
{
4141
if ($this->app->environment() !== 'production') {
42-
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
42+
$this->app->register(DebugbarServiceProvider::class);
43+
$this->app->register(IdeHelperServiceProvider::class);
4344
}
4445

4546
if (config('pterodactyl.auth.notifications')) {
46-
$this->app->register(\DaneEveritt\LoginNotifications\NotificationServiceProvider::class);
47+
$this->app->register(NotificationServiceProvider::class);
4748
}
4849
}
4950

config/app.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171
/*
172172
* Additional Dependencies
173173
*/
174-
Barryvdh\Debugbar\ServiceProvider::class,
175174
PragmaRX\Google2FA\Vendor\Laravel\ServiceProvider::class,
176175
igaster\laravelTheme\themeServiceProvider::class,
177176
Prologue\Alerts\AlertsServiceProvider::class,
@@ -209,7 +208,6 @@
209208
'Cron' => Cron\CronExpression::class,
210209
'Crypt' => Illuminate\Support\Facades\Crypt::class,
211210
'DB' => Illuminate\Support\Facades\DB::class,
212-
'Debugbar' => Barryvdh\Debugbar\Facade::class,
213211
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
214212
'Event' => Illuminate\Support\Facades\Event::class,
215213
'File' => Illuminate\Support\Facades\File::class,

0 commit comments

Comments
 (0)