<?php namespace BookStack\Providers;
-use Carbon\Carbon;
+use BookStack\Services\SettingService;
+use BookStack\Setting;
use Illuminate\Support\ServiceProvider;
use Validator;
return in_array($value->getMimeType(), $imageMimes);
});
- Carbon::setLocale(config('app.locale'));
+ \Blade::directive('icon', function($expression) {
+ return "<?php echo icon($expression); ?>";
+ });
+
+ // Allow longer string lengths after upgrade to utf8mb4
+ \Schema::defaultStringLength(191);
}
/**
*/
public function register()
{
- //
+ $this->app->singleton(SettingService::class, function($app) {
+ return new SettingService($app->make(Setting::class), $app->make('Illuminate\Contracts\Cache\Repository'));
+ });
}
}