Yasen Sayed
6 Mar 2022
Laravel
I'd like to add Arabic words, paragraphs in the dummy data faker generator in the Laravel project for example see below:
public function definition(): array
{
return [
'name_en' => $this->faker->unique()->name,
'name_ar' => $this->faker->unique()->name, // It should be in Arabic
'synonyms_en' => $this->faker->paragraph,
'synonyms_ar' => $this->faker->paragraph,// It should be in Arabic
];
}
Please, anyone can help me to do this?
nico
7 Mar 2022
Hello Yasen did you try to use
$faker = Faker\Factory::create('ar_AA');
But Here you can find all the locales
//faker.readthedocs.io/en/master/locales
You have to choose the local you need depending on the country as arabic is spoken in many places.
It should help, kind regards
© 2024 Copyrights reserved for web-brackets.com