Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nrancnik's avatar

Astronomic/laravel-translatable multiple languages

Helloo,

Im interested if there is a way with this package "astrotomic/laravel-translatable" for me to seed the database with "fzaninotto/faker" with the same values but in different languages, not random names but the same names, same values, different languages

for example, I have this code...

faker = Faker\Factory::create('en_US');

    $data = [
        'slug' => $faker->unique()->word(),
        'en' => [
            'title' => $faker->name()
        ],
        'fr' => [
            'title' => $faker->name()
        ]
    ];

Is there any way for me to seed the database with the same name for example some dishes, in English and say French ....

Thanks in advance!

0 likes
0 replies

Please or to participate in this conversation.