Seed DemoWorld attendees and speakers for Events demo continuity
Deploy Ladill Events / deploy (push) Successful in 1m18s

Attendee registrations, programme hosts, and event speakers now draw
name/email/phone/company from DemoWorld people instead of generic
placeholders, and staff logins skip the login reseed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-17 13:40:15 +00:00
co-authored by Cursor
parent 11656eaad1
commit 701cffb143
4 changed files with 609 additions and 11 deletions
+18 -11
View File
@@ -9,6 +9,7 @@ use App\Models\QrEventRegistration;
use App\Models\QrTeamMember;
use App\Models\User;
use App\Services\Events\SubscriptionService;
use App\Support\DemoWorld;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
@@ -171,6 +172,9 @@ class DemoSeedCommand extends Command
$eventCount = $paid ? ($plan === 'enterprise' ? 5 : 4) : 2;
$regsPerEvent = $paid ? ($plan === 'enterprise' ? 40 : 25) : 35;
$keynoteSpeaker = DemoWorld::personByKey('ama-mensah');
$breakoutSpeaker = DemoWorld::personByKey('kojo-darko');
$programmeId = null;
if ($paid) {
$programme = QrCode::query()->updateOrCreate(
@@ -197,8 +201,8 @@ class DemoSeedCommand extends Command
'title' => 'Opening keynote',
'description' => 'Welcome and product roadmap',
'location' => 'Main hall',
'host' => 'Ama Mensah',
'host_speaker_email' => 'ama.demo@ladill.com',
'host' => DemoWorld::fullName($keynoteSpeaker),
'host_speaker_email' => $keynoteSpeaker['email'],
],
[
'ref' => 'day0-item1',
@@ -206,8 +210,8 @@ class DemoSeedCommand extends Command
'title' => 'Breakout: ticketing',
'description' => 'Paid tiers and badges',
'location' => 'Room B',
'host' => 'Kojo Asante',
'host_speaker_email' => 'kojo.demo@ladill.com',
'host' => DemoWorld::fullName($breakoutSpeaker),
'host_speaker_email' => $breakoutSpeaker['email'],
],
],
]],
@@ -243,7 +247,7 @@ class DemoSeedCommand extends Command
'location' => 'Accra, Ghana',
'starts_at' => now()->addDays(7 + $i)->toIso8601String(),
'ends_at' => now()->addDays(7 + $i)->addHours(6)->toIso8601String(),
'organizer' => $user->name ?: 'Ladill Demo',
'organizer' => DemoWorld::business($plan)['name'],
'currency' => 'GHS',
'mode' => $mode,
'format' => $i === 1 ? 'in_person' : 'hybrid',
@@ -255,8 +259,8 @@ class DemoSeedCommand extends Command
'programme_qr_id' => $programmeId,
'speakers' => $paid ? [
[
'name' => 'Ama Mensah',
'email' => 'ama.demo@ladill.com',
'name' => DemoWorld::fullName($keynoteSpeaker),
'email' => $keynoteSpeaker['email'],
'role' => 'Keynote',
],
] : [],
@@ -301,11 +305,14 @@ class DemoSeedCommand extends Command
return;
}
$people = DemoWorld::people();
for ($n = $existing + 1; $n <= $count; $n++) {
$tier = $paid ? ($n % 5 === 0 ? 'VIP' : 'General') : 'Registration';
$amount = $paid ? ($tier === 'VIP' ? 45000 : 15000) : 0;
$ref = sprintf('%s-r%02d-%03d', $prefix, $eventIndex, $n);
$badge = strtoupper(substr($prefix, 2, 4).sprintf('%02d%03d', $eventIndex, $n));
$person = $people[($n - 1) % count($people)];
QrEventRegistration::query()->updateOrCreate(
['reference' => $ref],
@@ -316,11 +323,11 @@ class DemoSeedCommand extends Command
'tier_name' => $tier,
'amount_minor' => $amount,
'currency' => 'GHS',
'attendee_name' => 'Demo Attendee '.$n,
'attendee_email' => 'attendee'.$n.'.e'.$eventIndex.'@demo.ladill.com',
'attendee_phone' => '+23320'.str_pad((string) (($eventIndex * 1000) + $n), 7, '0', STR_PAD_LEFT),
'attendee_name' => DemoWorld::fullName($person),
'attendee_email' => $person['email'],
'attendee_phone' => $person['phone'],
'badge_fields' => [
'company' => 'Demo Co '.$n,
'company' => DemoWorld::companyNameForPerson($person),
'role' => $tier === 'VIP' ? 'Executive' : 'Guest',
],
'status' => QrEventRegistration::STATUS_CONFIRMED,