How to seed database after deploying the Laravel app on production?
How to seed database after deploying the Laravel app on production?
You just seed the same way you seed on development: php artisan db:seed
@richard thanks for the reply,
it throws
Class 'Faker\Factory' not found
What does your seed look like? You probably dont want to seed fake data on production....
@zachleigh hmm how do i login admin user if i dont seed users table?
I would just log on to my server and create an admin user record... What does your seed class look like?
@zachleigh oh i see, thanks! can i just log in mysql and import may users and permissions table?
Yes. You can import your whole database if you want.
Probably best to just ssh into the box and manually create your admin user via tinker though.
Yes, SSH into your server and tinker. That is the best way. Run factory command like
factory(App\Product::class, 50)->create(); directly from tinker command line to quickly get upto speed.
Please or to participate in this conversation.