43 lines
931 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
namespace App\Providers;
2019-12-13 19:27:14 +03:00
use Blade;
2019-11-16 10:21:14 +03:00
use Illuminate\Support\ServiceProvider as Provider;
2019-12-13 19:27:14 +03:00
use Schema;
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
class App extends Provider
2017-09-14 22:21:00 +03:00
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// Laravel db fix
2019-12-13 19:27:14 +03:00
Schema::defaultStringLength(191);
2019-11-16 10:21:14 +03:00
2019-12-13 19:27:14 +03:00
// @todo Remove the if control after 1.3 update
if (method_exists('Blade', 'withoutDoubleEncoding')) {
Blade::withoutDoubleEncoding();
}
2017-09-14 22:21:00 +03:00
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
2017-09-23 18:43:09 +03:00
if (env('APP_INSTALLED') && env('APP_DEBUG')) {
2017-09-14 22:21:00 +03:00
$this->app->register(\Barryvdh\Debugbar\ServiceProvider::class);
}
if (env('APP_ENV') !== 'production') {
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
}
}
}