Closed jakubmikita closed 3 years ago
@Kubitomakita than you for your question, think of this as any normal model, which you need to create instances of pinky intentionally when required.
Short answer is: Seeder, or controller, whichever better for you, but absolutely not service provider.
Seeders & controllers are executed on your demand, but service provider is being executed in every single request to your app.
I couldn't find this info anywhere.
Doing
app('rinvex.attributes.attribute')->create()
in the Service Providerboot
method results in creating another entry in the database.Would the Seeder be an appropriate place to do it?