Answers for "nwidart/laravel-modules seed"

PHP
0

nwidart/laravel-modules seed

to insert seeded data you'll need to define it in module.json
{
    "name": "Rates",
    "alias": "rates",
    .
    .
    .
    "migration": {
        "seeds": [
            "Modules\\Rates\\database\\seeds\\v1\\DatabaseSeeder"
        ]
    }
}
then run command
php artisan module:seed Rates to seed all the seeders defined there or
php artisan module:seed Rates --class=DatabaseSeeder to seed one single seeder.

the key here is to define your seeder classes in module.json
Posted by: Guest on April-20-2022

Browse Popular Code Answers by Language