Welcome Guest, Not a member yet? Register   Sign In
Third Party seeds?
#1

How would I create and run a seed from a Third Party module?

I can seem to only run seeds from App\Database\Seeds ... can I 'somehow' point:

Code:
php spark db:seed DefaultUser -path \App\ThirdParty\Auth

Would be nice ...
Reply
#2

I know that you can run them from a module but I don't think you can run them from
the ThirdParty folder because there is no database folder.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

You can do it, but official documentation is not write well.

https://codeigniter4.github.io/userguide...html#seeds

For call a Seed from an external module in CLI asuming that name space of module is: \App\ThirdParty\

Seed must have a namespace like this: \App\ThirdParty\Database\Seeds

Assuming that the class name of this Seed is Auth

the right way to write command is:


Code:
php spark db:seed [color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif][b][color=#333333][size=small][size=small][font=Tahoma, Verdana, Arial, sans-serif]\App\ThirdParty\[/font][/size][/size][/color]Database\Seeds\Auth[/b][/font][/size][/color]
Reply




Theme © iAndrew 2016 - Forum software by © MyBB