CustomerLogStatusesTableSeeder.php 483 B

1234567891011121314151617181920
  1. <?php
  2. use App\CustomerLogStatus;
  3. use Illuminate\Database\Seeder;
  4. class CustomerLogStatusesTableSeeder extends Seeder
  5. {
  6. public function run()
  7. {
  8. $customer_log_statuses = factory(CustomerLogStatus::class)->times(50)->make()->each(function ($customer_log_status, $index) {
  9. if ($index == 0) {
  10. // $customer_log_status->field = 'value';
  11. }
  12. });
  13. CustomerLogStatus::insert($customer_log_statuses->toArray());
  14. }
  15. }