Category : locale

When running dusk tests, date fields within the test are always in US format but I required them to be in British format. My chrome options look like this: $options = (new ChromeOptions)->addArguments([ ‘–disable-gpu’, ‘–headless’, ‘–no-sandbox’, ‘–ignore-ssl-errors’, ‘–whitelisted-ips=""’, ‘–window-size=1920,1080’, ‘–lang=en_GB’, ]); In my dusk test case file I am also setting the locale using: app()->setLocale(‘en’); ..

Read more

In my Laravel 6 app, I have Carbon::now()->locale() returning it as it should be. As confirmation that the locale is loaded, Carbon::now()->monthName correctly outputs febbraio. BUT Carbon::now()->format(‘F’) and Carbon::now()->formatLocalized(‘%B’) both return the english version February. Why does the first function output the correct localized month while the others do not? Source: Laravel Sta..

Read more