Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fixing laravel monolog timezone
<?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