Created
December 18, 2020 20:10
-
-
Save samhk222/e19374a23cfbdd4ac4f06618fcdf02af to your computer and use it in GitHub Desktop.
Fixing laravel monolog timezone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Log; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
// | |
} | |
/** | |
* Register any application services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
Log::setTimezone(new \DateTimeZone('UTC')); | |
$this->app->singleton(\Faker\Generator::class, function () { | |
return \Faker\Factory::create('pt_BR'); | |
}); | |
if ($this->app->environment() === "local") { | |
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment