Skip to content

Instantly share code, notes, and snippets.

@feryxz
feryxz / Set locale and timezone to Indonesian in framework Laravel
Created June 28, 2020 10:30
Set locale and timezone to Indonesian in framework Laravel
in file App\Providers\AppServiceProvider
dont forget add carbon
use Carbon\Carbon;
public function boot()
{
config(['app.locale' => 'id']);
Carbon::setLocale('id');
date_default_timezone_set('Asia/Jakarta');