Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

nwidart/laravel-modules seed


to insert seeded data you'll need to define it in module.json
{
    "name": "Rates",
    "alias": "rates",
    .
    .
    .
    "migration": {
        "seeds": [
            "ModulesRatesdatabaseseedsv1DatabaseSeeder"
        ]
    }
}
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
Source by github.com #
 
PREVIOUS NEXT
Tagged: #seed
ADD COMMENT
Topic
Name
5+3 =