Seeder on migration |
Can i insert multiple row while run migration ?
For example i have a class PopulateUserState with a run method : PHP Code: public function run() Can i launch this method on migration ? Other answer , how can i add pultiple row on seeder run ?
You would need to do a insertBatch.
PHP Code: $this->db->table('blog')->insertBatch([ You may also be able to use a foreach loop if you need to input lots of data from a file or something. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |