Forked from ahmadshobirin/set locale and timezone indonesia in laravel.md
Created
September 19, 2020 07:35
-
-
Save ahmadrosid/28134bdb3188e9a5a6da87dfbb1d28af to your computer and use it in GitHub Desktop.
This file contains 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
// App\Providers\AppServiceProvider | |
public function boot() | |
{ | |
config(['app.locale' => 'id']); | |
Carbon::setLocale('id'); | |
date_default_timezone_set('Asia/Jakarta'); | |
} | |
// config/app.php | |
'timezone' => 'Asia/Jakarta', | |
'locale' => 'id', | |
'faker_locale' => 'id_ID', | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment