Akaunting/app/Providers/App.php

43 lines
931 B
PHP
Raw Normal View History

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