Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Concord Laravel Package

konekt/concord

Laravel extension for building modular applications using conventions on top of service providers. Manage in-app and external modules with isolation-friendly structure, version compatibility across Laravel releases, and tooling around module registration and organization.

View on GitHub
Deep Wiki
Context7

Seeders

Seeders are just normal Laravel seeders. The default (recommended) folder for db seeds is <module_root>/resources/database/seeds

The only difference compared to seeders placed in your project's database/seeds folder is that app seeders use no namespace.

Possible Solutions For Class Autoloading

Use Nice Namespaces (Best)

  1. Put your seeder class in the resources/database/seeds folder.
  2. Use namespace Vendor\Module\Seeds.
  3. Add the namespace in composer.json:
"autoload": {
    "psr-4": {
        "Vendor\\Module\\": "src",
        "Vendor\\Module\\Seeds\\": "src/resources/database/seeds"
    }
}

Then you can either added the seeder to the main DatabaseSeeder's run method $this->call(\Vendor\Module\Seeds\YourSeeder::class) or invoke explicitly with artisan:

php artisan db:seed --class="\Vendor\Module\Seeds\YourSeeder"

Use Ugly Namespaces (Easy)

  1. Put your seeder class in the resources/database/seeds folder.
  2. Use namespace Vendor\Module\resources\database\seeds.

Adding to app's main the seeder:

class DatabaseSeeder extends \Illuminate\Database\Seeder
{
    public function run()
    {
        $this->call(\Vendor\Module\resources\database\seeds\YourSeeder::class);        
    }
}

Invoking with artisan:

php artisan db:seed --class="\Vendor\Module\resources\database\seeds\YourSeeder"

Use No Namespace (Simple)

If you're sure you won't conflict with other seeders having the same name, then you can go without seeders having namespaces.

  1. Put your seeder class in the resources/database/seeds folder.
  2. Use a composer json like this:
"autoload": {
    "classmap": [
        "src/resources/database/seeds"    
    ],
    "psr-4": {
        "Vendor\\Module\\": "src"
    }
}

Adding to DatabaseSeeder $this->call(YourSeeder::class);

Invoking explicitely with artisan:

php artisan db:seed --class=YourSeeder

Next: Models (Entities) »

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4