Skip to content

Factories / Seeders in Service deprecated? #31

Answered by Mulkave
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

@mwkohler if you had generated a service with lucid make service {name} there should be a database folder generated automatically with the following structure (assuming the service name is Chat):

app/Services/Chat/database
├── factories
├── migrations
└── seeds

In the examples below we assume the service name is Chat. Make sure you replace it with your service's name instead.

Factories

  1. Update composer to autoload service's factories
    • Under autoload.psr-4 add "App\\Services\\Chat\\Database\\Factories\\": "app/Services/Chat/database/factories/"
      So your composer.json should have a similar section as this:
       "autoload": {
             "psr-4": {
                 "App\\": "app/",
                 "Database\\F…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Mulkave
Comment options

Answer selected by Mulkave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #26 on September 09, 2021 11:12.