2016-09-03 11:08:58 +00:00
|
|
|
<?php namespace BookStack\Providers;
|
2015-07-12 19:01:42 +00:00
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
2016-07-01 19:11:49 +00:00
|
|
|
// Custom validation methods
|
|
|
|
\Validator::extend('is_image', function($attribute, $value, $parameters, $validator) {
|
|
|
|
$imageMimes = ['image/png', 'image/bmp', 'image/gif', 'image/jpeg', 'image/jpg', 'image/tiff', 'image/webp'];
|
|
|
|
return in_array($value->getMimeType(), $imageMimes);
|
|
|
|
});
|
2016-12-19 08:05:06 +00:00
|
|
|
Carbon::setLocale(Config::get('app.locale'));
|
2016-07-01 19:11:49 +00:00
|
|
|
|
2015-07-12 19:01:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|