Fixed carbon locale setting
This commit is contained in:
		
							parent
							
								
									9fe158b78a
								
							
						
					
					
						commit
						0eb90cb3b6
					
				| 
						 | 
				
			
			@ -1,6 +1,8 @@
 | 
			
		|||
<?php namespace BookStack\Providers;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Illuminate\Support\ServiceProvider;
 | 
			
		||||
use Validator;
 | 
			
		||||
 | 
			
		||||
class AppServiceProvider extends ServiceProvider
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -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'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue