Conditionally loading ServiceProvider (#578)

This commit is contained in:
Ryo Shibayama 2017-05-10 18:49:12 +09:00 committed by Phan An
parent 1f110ddff6
commit 70464a8977
2 changed files with 4 additions and 3 deletions

View file

@ -31,6 +31,9 @@ class AppServiceProvider extends ServiceProvider
*/
public function register()
{
//
if (!$this->app->environment('production')) {
$this->app->register('Laravel\Tinker\TinkerServiceProvider');
$this->app->register('Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider');
}
}
}

View file

@ -138,8 +138,6 @@ return [
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Laravel\Tinker\TinkerServiceProvider::class,
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
Aws\Laravel\AwsServiceProvider::class,