芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/database/seeders/EventTableSeeder.php
pluck('id')->toArray(); \App\Models\Event::factory()->count((int)$count)->create()->each(function (Event $event) use ($faker, $companyId, $employees) { $event->company_id = $companyId; $event->save(); try { $randomEmployeeArray = $faker->randomElements($employees, $faker->numberBetween(1, count($employees))); foreach ($randomEmployeeArray as $employee) { \App\Models\EventAttendee::create([ 'user_id' => $employee, 'event_id' => $event->id, 'company_id' => $companyId ]); } } catch (Exception $e) { Log::info($e); } }); } }