Skip to content

Commit

Permalink
Fixed carbon locale setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Dec 31, 2016
1 parent 9fe158b commit 0eb90cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php namespace BookStack\Providers;

use Carbon\Carbon;
use Illuminate\Support\ServiceProvider;
use Validator;

class AppServiceProvider extends ServiceProvider
{
Expand All @@ -12,12 +14,12 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
// Custom validation methods
\Validator::extend('is_image', function($attribute, $value, $parameters, $validator) {
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);
});
Carbon::setLocale(Config::get('app.locale'));

Carbon::setLocale(config('app.locale'));
}

/**
Expand Down

0 comments on commit 0eb90cb

Please sign in to comment.