CustomerLogsTableSeeder.php 428 B

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