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()
|
|
|
|
{
|
2020-04-26 06:07:27 -04:00
|
|
|
if (config('app.installed') && config('app.debug')) {
|
2017-09-14 22:21:00 +03:00
|
|
|
$this->app->register(\Barryvdh\Debugbar\ServiceProvider::class);
|
|
|
|
}
|
|
|
|
|
2020-04-26 06:07:27 -04:00
|
|
|
if (config('app.env') !== 'production') {
|
2017-09-14 22:21:00 +03:00
|
|
|
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|