Laravel DB Seeds - Test Data v Sample Data

后端 未结 1 1614
深忆病人
深忆病人 2021-01-03 03:56

I\'m probably misunderstanding exactly how this works, but what\'s the best way to accomplish this? I have something in mind but it seems quite hacky.

I have a set o

1条回答
  •  别那么骄傲
    2021-01-03 04:37

    You could run a check on the current environment in your seeder file, and seed as needed

    call('ProductionSeeder');
                }
                else
                {
                    $this->call('StagingSeeder');
                }
        }
    
    }
    

    0 讨论(0)
提交回复
热议问题