254 lines
22 KiB
PHP
254 lines
22 KiB
PHP
<?php
|
||
|
||
namespace Database\Seeders;
|
||
|
||
use Illuminate\Database\Seeder;
|
||
use Illuminate\Support\Str;
|
||
use App\Models\{Emotion, Task, Tenant};
|
||
|
||
class EventTasksSeeder extends Seeder
|
||
{
|
||
public function run(): void
|
||
{
|
||
// Get demo tenant
|
||
$demoTenant = Tenant::where('slug', 'demo')->first();
|
||
if (!$demoTenant) {
|
||
$this->command->info('Demo tenant not found, skipping EventTasksSeeder');
|
||
return;
|
||
}
|
||
|
||
// Define 20 themed prompts per emotion (DE/EN)
|
||
$catalog = [
|
||
'Liebe' => [
|
||
['Herzrahmen', 'Formt mit euren Händen ein Herz um das Paar.', 'Heart Frame', 'Make a heart with your hands around the couple.'],
|
||
['Erster Blick', 'Fangt den Moment des ersten Blicks ein.', 'First Look', 'Capture the first look moment.'],
|
||
['Kuss im Konfetti', 'Kussmoment mit Konfetti oder Blütenregen.', 'Kiss in Confetti', 'A kiss with confetti or petals.'],
|
||
['Ringmoment', 'Nahaufnahme von Händen und Ringen.', 'Rings & Hands', 'Close‑up of hands and rings.'],
|
||
['Schleierwind', 'Der Schleier weht – fangt Bewegung ein.', 'Veil in the Wind', 'Catch the veil in motion.'],
|
||
['Liebesbrief', 'Lest euch eine kurze Botschaft vor.', 'Love Note', 'Read a short love note.'],
|
||
['Umarmung von hinten', 'Eine Person umarmt die andere von hinten.', 'Back Hug', 'Back hug pose.'],
|
||
['Sonnenuntergang', 'Silhouette im goldenen Licht.', 'Sunset Silhouette', 'Silhouette in golden light.'],
|
||
['Nasenstupser', 'Forehead‑ oder Nose‑Touch.', 'Forehead Touch', 'Forehead or nose touch.'],
|
||
['Händchenhalten', 'Hände greifen sich – Fokus auf Gefühl.', 'Holding Hands', 'Hands meeting – focus on feeling.'],
|
||
['Tanz im Freien', 'Kurzer Tanzschritt unter freiem Himmel.', 'Dance Outside', 'A quick dance step outdoors.'],
|
||
['Lächeln mit Augen', '„Smize“ – lächelt nur mit den Augen.', 'Smize', 'Smile with your eyes.'],
|
||
['Gegensätze ziehen an', 'Stellt eure Unterschiede liebvoll dar.', 'Opposites Attract', 'Show your differences playfully.'],
|
||
['Hinter dem Schleier', 'Kuss hinter dem Schleier.', 'Behind the Veil', 'Kiss behind the veil.'],
|
||
['Hand aufs Herz', 'Hände auf Herz – echter Moment.', 'Hand on Heart', 'Hands on heart – genuine moment.'],
|
||
['Namen schreiben', 'Schreibt Namen in die Luft (Lichtspur).', 'Name in Light', 'Write names in the air (light trail).'],
|
||
['Blick zurück', 'Geht weg und schaut zurück zur Kamera.', 'Look Back', 'Walk away, look back to camera.'],
|
||
['Gemeinsames Lachen', 'Bringt euch zum Lachen und klick.', 'Shared Laugh', 'Make each other laugh and snap.'],
|
||
['Spiegelmoment', 'Euer Spiegelbild kreativ einbauen.', 'Mirror Moment', 'Use your reflection creatively.'],
|
||
['Handkuss', 'Ein klassischer Handkuss.', 'Hand Kiss', 'A classic hand kiss.'],
|
||
],
|
||
'Freude' => [
|
||
['Lachwelle', 'Reihe bildet nacheinander eine Lachwelle.', 'Laugh Wave', 'Create a laugh wave one by one.'],
|
||
['High‑Five‑Kette', 'Gebt euch reihum High‑Fives.', 'High‑Five Chain', 'High‑fives around the group.'],
|
||
['Freudensprung', 'Springt gleichzeitig in die Luft.', 'Jump of Joy', 'Jump together.'],
|
||
['Fotobomb', 'Huscht freundlich ins Bild.', 'Photobomb', 'Sneak into the shot (friendly!).'],
|
||
['Überraschtes Gesicht', 'Überraschte Mimik – Hände hoch!', 'Surprised Face', 'Surprised faces – hands up!'],
|
||
['Spiegel‑Lacher', 'Spiegelt exakt die Mimik.', 'Mirror Laugh', 'Mirror each other’s laugh.'],
|
||
['Tanzender Eingang', 'Tanzend ins Bild laufen.', 'Dancing Entrance', 'Dance into the frame.'],
|
||
['Konfetti‑Grinsen', 'Konfetti werfen & lachen.', 'Confetti Grin', 'Throw confetti & grin.'],
|
||
['Witz erzählen', 'Schneller Witz – Klick beim Lachen.', 'Tell a Joke', 'Tell a joke, snap at the laugh.'],
|
||
['Freunde‑Huddle', 'Köpfe zusammen, Grinsen groß.', 'Friends Huddle', 'Heads together, big grin.'],
|
||
['Back‑to‑Back', 'Rücken an Rücken posieren.', 'Back to Back', 'Pose back‑to‑back.'],
|
||
['V‑Zeichen', 'Peace‑Zeichen kreativ einsetzen.', 'Peace Sign', 'Use peace sign creatively.'],
|
||
['Luftkuss', 'Kuss in die Kamera werfen.', 'Air Kiss', 'Blow a kiss to the camera.'],
|
||
['Emoji‑Gesichter', 'Stellt Emojis nach.', 'Emoji Faces', 'Act out your favorite emojis.'],
|
||
['Mini‑Choreo', '3‑Schritt‑Tanz, dann Foto.', 'Mini Choreo', '3‑step dance then photo.'],
|
||
['Hut‑Tausch', 'Accessoires tauschen & posen.', 'Hat Swap', 'Swap props and pose.'],
|
||
['Cheers!', 'Gläser/Tassen anstoßen.', 'Cheers!', 'Clink glasses/cups.'],
|
||
['Zungenakrobatik', 'Zunge raus – Spaßpose.', 'Silly Tongue', 'Tongue out – silly pose.'],
|
||
['Oh‑yeah‑Pose', 'Begeisterungs‑Pose mit Fäusten.', 'Oh‑Yeah Pose', 'Fists up “oh‑yeah” pose.'],
|
||
['Händeschütteln', 'Übertriebenes Händeschütteln.', 'Epic Handshake', 'Over‑the‑top handshake.'],
|
||
],
|
||
'Rührung' => [
|
||
['Berührender Blick', 'Schaut euch sanft in die Augen.', 'Tender Look', 'Gently look into each other’s eyes.'],
|
||
['Freudentränen', 'Ein Taschentuchmoment (authentisch).', 'Happy Tears', 'Capture a tissue moment.'],
|
||
['Hände nah', 'Nahaufnahme ineinanderliegender Hände.', 'Hands Close', 'Close‑up of intertwined hands.'],
|
||
['Dankesumarmung', 'Umarmt jemanden, dem ihr danken wollt.', 'Thank‑You Hug', 'Hug someone you want to thank.'],
|
||
['Erinnerungsstück', 'Haltet ein Erinnerungsstück in die Kamera.', 'Keepsake', 'Show a meaningful keepsake.'],
|
||
['Flüstern', 'Flüstert ein Kompliment ins Ohr.', 'Whisper Compliment', 'Whisper a compliment.'],
|
||
['Ruhemoment', 'Schließt kurz die Augen, atmet ein.', 'Quiet Moment', 'Close eyes, breathe in.'],
|
||
['Schulterblick', 'Kopf auf Schulter – Geborgenheit.', 'Head on Shoulder', 'Head on shoulder – warmth.'],
|
||
['Verlobungsstory', 'Zeigt „so war’s“ mit Gesten.', 'Engagement Story', 'Act out “how it happened”.'],
|
||
['Geschenk öffnen', 'Kleines Geschenk öffnen – Reaktion.', 'Open a Gift', 'Open a small gift – reaction.'],
|
||
['Erste Erinnerung', 'Teilt eine kurze erste Erinnerung.', 'First Memory', 'Share a first memory.'],
|
||
['Wunsch ans Paar', 'Flüstert einen Wunsch fürs Paar.', 'Wish for Couple', 'Whisper a wish for the couple.'],
|
||
['Nahporträt', 'Sehr nahes Porträt – sanftes Licht.', 'Close Portrait', 'Very close portrait, soft light.'],
|
||
['Schritt für Schritt', 'Langsam aufeinander zugehen.', 'Step by Step', 'Walk slowly towards each other.'],
|
||
['Gedankenpose', 'Denkt an etwas Schönes – Klick.', 'Thoughtful Pose', 'Think of something lovely – click.'],
|
||
['Ringkuss', 'Kuss auf die Hand mit Ring.', 'Ring Kiss', 'Kiss the hand with the ring.'],
|
||
['Stille Freude', 'Leises Lächeln, geschlossene Augen.', 'Quiet Joy', 'Soft smile, eyes closed.'],
|
||
['Vertrauter Halt', 'Arm einhaken, nah zusammen.', 'Linked Arms', 'Link arms, stand close.'],
|
||
['„Danke“ zeigen', 'Schreibt „Danke“ mit Händen/Karte.', 'Show “Thank You”', 'Show “Thank You” with hands/card.'],
|
||
['Ein Wort', 'Sagt gleichzeitig 1 Wort über den anderen.', 'One Word', 'Say one word about the other.'],
|
||
],
|
||
'Nostalgie' => [
|
||
['Altes Foto nachstellen', 'Stellt ein altes Familienfoto nach.', 'Recreate Old Photo', 'Recreate an old family photo.'],
|
||
['Schwarzweiß', 'Tut so, als wäre es 1960 – s/w Look.', 'Black & White', 'Pretend it’s 1960 – b/w mood.'],
|
||
['Tanz der Eltern', 'Imitiert den Tanz eurer Eltern.', 'Parents’ Dance', 'Imitate your parents’ dance.'],
|
||
['Vintage‑Pose', 'Hände gefaltet, altmodische Pose.', 'Vintage Pose', 'Folded hands, old‑school pose.'],
|
||
['Familienerbstück', 'Haltet ein Erbstück in die Kamera.', 'Heirloom', 'Show a family heirloom.'],
|
||
['Erstes Treffen', 'Stellt euer erstes Treffen nach.', 'First Meeting', 'Reenact your first meeting.'],
|
||
['Album aufschlagen', 'Album/Handy‑Galerie zeigen.', 'Open Album', 'Show an album/gallery.'],
|
||
['Zeitreise', 'Pose wie in eurer Lieblingsdekade.', 'Time Travel', 'Pose from your favorite decade.'],
|
||
['Brief an Zukunft', 'Haltet “Brief an uns” in Kamera.', 'Letter to Future', 'Hold “letter to us” to camera.'],
|
||
['Requisiten retro', 'Retro‑Accessoires improvisieren.', 'Retro Props', 'Improvise retro props.'],
|
||
['Polaroid‑Look', 'Haltet einen Rahmen wie Polaroid.', 'Polaroid Frame', 'Pose with a “polaroid” frame.'],
|
||
['Kinderfoto', 'Haltet ein Kinderfoto – gleiche Pose.', 'Childhood Photo', 'Hold a childhood photo – same pose.'],
|
||
['Alte Geste', 'Eine frühere Gewohnheit nachstellen.', 'Old Habit', 'Act out an old habit.'],
|
||
['Telefon von früher', 'Imitierte Telefongesten von früher.', 'Old Phone', 'Old‑school phone gesture.'],
|
||
['Hut & Handschuhe', 'Elegante 20er‑Jahre Geste.', 'Hat & Gloves', 'Elegant 1920s gesture.'],
|
||
['Nostalgie‑Umarmung', 'Langsame, lange Umarmung.', 'Nostalgic Hug', 'Slow, long hug.'],
|
||
['Erster Tanzschritt', 'Stellt den ersten Tanzschritt nach.', 'First Step', 'Reenact first dance step.'],
|
||
['Alte Kamera', 'Tut so, als würdet ihr analog knipsen.', 'Old Camera', 'Pretend to shoot on film.'],
|
||
['Kinoplakat', 'Stellt ein altes Filmplakat nach.', 'Movie Poster', 'Recreate a vintage movie poster.'],
|
||
['Handschrift', 'Schreibt Vornamen mit schöner Schrift.', 'Handwriting', 'Write names in neat script.'],
|
||
],
|
||
'Überraschung' => [
|
||
['Konfetti‑Boom', 'Unerwarteter Konfettischwall – Klick!', 'Confetti Boom', 'Surprise confetti – snap!'],
|
||
['Hinter dem Rücken', 'Zeigt etwas hinter dem Rücken vor.', 'Behind the Back', 'Reveal something from behind your back.'],
|
||
['Gäste tauchen auf', 'Neue Person springt ins Bild.', 'Pop‑in Guest', 'A guest pops into frame.'],
|
||
['Geschenk‑Reveal', 'Kleines Geschenk enthüllen.', 'Gift Reveal', 'Reveal a small gift.'],
|
||
['Plötzlicher Tanz', 'Unerwarteter Tanzmove!', 'Sudden Dance', 'Do a surprise dance move.'],
|
||
['Hand vor Mund', '„Oh!“‑Geste mit Augen groß.', 'Oh! Gesture', '“Oh!” gesture, big eyes.'],
|
||
['Wechsel der Plätze', 'Springt schnell die Plätze.', 'Switch Places', 'Quickly switch places.'],
|
||
['Falsche Richtung', 'Schaut alle woanders hin.', 'Look Away', 'Everyone looks elsewhere.'],
|
||
['Flip‑Pose', 'Posenwechsel auf Kommando.', 'Flip Pose', 'Flip pose on cue.'],
|
||
['Plötzliches Lachen', 'Lachen aus dem Nichts.', 'Sudden Laugh', 'Burst into laughter.'],
|
||
['Versteckspiel', 'Versteckt euch hinter Deko.', 'Hide & Seek', 'Hide behind decor.'],
|
||
['Schattenspiel', 'Schatten an der Wand formen.', 'Shadow Play', 'Make shadows on the wall.'],
|
||
['Schnips‑Moment', 'Schnippt und friert ein.', 'Snap & Freeze', 'Snap fingers and freeze.'],
|
||
['Unerwarteter Hut', 'Plötzlich Hut/Schal tauschen.', 'Surprise Hat', 'Swap hats/scarves.'],
|
||
['Zaubertrick', 'Kleiner „Magic“‑Trick.', 'Magic Trick', 'A tiny “magic” trick.'],
|
||
['Drehen & Stopp', 'Dreht euch – Stopp – Klick.', 'Spin & Stop', 'Spin and stop – snap.'],
|
||
['Enger Zoom', 'Kamera ganz nah ran.', 'Tight Zoom', 'Get very close to the camera.'],
|
||
['Falscher Start', 'Tut so, als wärt ihr schon fertig.', 'False Start', 'Pretend you finished already.'],
|
||
['Mini‑Schreck', 'Erschreckt euch spielerisch.', 'Play Scare', 'Play a tiny scare.'],
|
||
['Jubelruf', 'Unerwarteter Jubel – Arme hoch.', 'Cheer Burst', 'Sudden cheer – hands up.'],
|
||
],
|
||
'Stolz' => [
|
||
['Siegerpose', 'Stolze Siegerpose mit Pokalgesten.', 'Victory Pose', 'Proud victory pose.'],
|
||
['Daumen hoch', 'Großer Daumen hoch zur Kamera.', 'Thumbs Up', 'Big thumbs up to camera.'],
|
||
['„Das haben wir geschafft“', 'Zeigt auf euch und lächelt stolz.', 'We Did It', 'Point at yourselves, proud smile.'],
|
||
['Orden anheften', 'Tut so, als würdet ihr Orden heften.', 'Pin a Medal', 'Pretend to pin a medal.'],
|
||
['Haltung zeigen', 'Aufrecht stehen, Brust raus.', 'Stand Tall', 'Stand upright, chest out.'],
|
||
['Meisterstück', 'Zeigt ein Ergebnis, auf das ihr stolz seid.', 'Masterpiece', 'Show a result you’re proud of.'],
|
||
['Team‑Applaus', 'Applaus füreinander, dann in Kamera.', 'Applaud Each Other', 'Applaud each other, then camera.'],
|
||
['Hand aufs Herz', 'Stolzer Blick, Hand aufs Herz.', 'Proud Heart', 'Hand on heart, proud look.'],
|
||
['Stehende Welle', 'Alle nacheinander aufstehen – Klick.', 'Standing Wave', 'Stand up one by one – snap.'],
|
||
['Schultern klopfen', 'Klopft euch freundlich auf die Schulter.', 'Pat on Back', 'Pat each other on the back.'],
|
||
['Banner hoch', 'Hebt ein Schild „Yeah!“ hoch.', 'Banner Up', 'Hold up a “Yeah!” sign.'],
|
||
['Heldenblick', 'Blick in die Ferne, Kinn hoch.', 'Hero Look', 'Look into distance, chin up.'],
|
||
['Trophäe improvisiert', 'Impro‑Trophäe in die Höhe.', 'Impro Trophy', 'Raise an improvised trophy.'],
|
||
['Da ist die Kamera', 'Selbstsicher direkt in die Linse.', 'Own the Lens', 'Confidently into the lens.'],
|
||
['Spitzenleistung', 'Zeigt die “Nummer Eins”‑Geste.', 'Number One', 'Show a “number one” gesture.'],
|
||
['Aufstellung', 'Stellt euch wie ein Teamfoto auf.', 'Line‑Up', 'Line up like a team photo.'],
|
||
['Partnerpose', 'Zwei nebeneinander – stolz.', 'Partner Pose', 'Two side by side – proud.'],
|
||
['Familienstolz', 'Familien‑Stolzpose mit Lächeln.', 'Family Pride', 'Family pride pose.'],
|
||
['Freundesstolz', 'Freundes‑Stolzpose, Arm in Arm.', 'Friends’ Pride', 'Arms around – pride.'],
|
||
['Applaus fürs Paar', 'Applaudiert dem Paar in Kamera.', 'Applause for Couple', 'Applaud the couple to camera.'],
|
||
],
|
||
'Teamgeist' => [
|
||
['Handkreis', 'Hände in der Mitte stapeln – Go!', 'Hand Circle', 'Hands stacked in the middle.'],
|
||
['Conga‑Linie', 'Conga‑Schlange – Foto von vorn.', 'Conga Line', 'Conga line – shot from front.'],
|
||
['Telefonkette', 'Flüstern nacheinander – letzter ruft’s.', 'Whisper Chain', 'Whisper chain – last says it.'],
|
||
['Namensschrift', 'Formt den Namen des Paars.', 'Name Shape', 'Shape the couple’s name.'],
|
||
['Brückenbau', 'Bildet eine Menschenbrücke.', 'Human Bridge', 'Form a human bridge.'],
|
||
['Wimpelzug', 'Zieht imaginäre Wimpel hoch.', 'Pennant Pull', 'Pull up imaginary pennants.'],
|
||
['Schulter an Schulter', 'Dicht zusammen – Teamblick.', 'Shoulder to Shoulder', 'Shoulder to shoulder.'],
|
||
['Wellenlauf', 'Eine Person läuft durch Spalier.', 'Guard of Honor', 'Run through a guard of honor.'],
|
||
['Spiegeln zu zweit', 'Zweier‑Teams spiegeln Posen.', 'Mirror in Pairs', 'Pairs mirror poses.'],
|
||
['Huckepack', 'Jemand trägt jemanden – sicher!', 'Piggyback', 'Piggyback (safely!).'],
|
||
['Doppel‑Cheers', 'Zweier‑“Cheers!” in Serie.', 'Double Cheers', 'Pairs do a quick cheers.'],
|
||
['Timing‑Klatscher', 'Alle klatschen gleichzeitig.', 'Sync Clap', 'Clap in sync.'],
|
||
['Zugseil', 'Tut so, als würdet ihr ein Seil ziehen.', 'Tug the Rope', 'Pretend tug of war.'],
|
||
['Handshake‑Kette', 'Kette aus Handschlägen.', 'Handshake Chain', 'Chain of handshakes.'],
|
||
['Formationsfoto', 'Stellt eine Form (Kreis/Herz).', 'Formation', 'Form a circle/heart.'],
|
||
['Staffelstab', 'Imitiere Staffelstab‑Übergabe.', 'Relay Baton', 'Relay baton hand‑off.'],
|
||
['Teamruf', 'Alle rufen denselben Teamruf.', 'Team Chant', 'Shout a team chant.'],
|
||
['Wir‑Welle', '“Wir!”‑Ruf, Hände hoch.', 'We‑Wave', 'Shout “We!” hands up.'],
|
||
['Gassenlauf', 'Gasse bilden – jemand läuft durch.', 'Lane Run', 'Form a lane – someone runs.'],
|
||
['Schulterreihe', 'Schultern fassen, Reihe bilden.', 'Linked Row', 'Link shoulders, form a row.'],
|
||
],
|
||
'Besinnlichkeit' => [
|
||
['Kerzenlicht', 'Portrait im Kerzenlicht (vorsichtig).', 'Candle Light', 'Portrait by candlelight (careful).'],
|
||
['Ruhepause', 'Augen schließen, tief atmen.', 'Quiet Pause', 'Close eyes, breathe deeply.'],
|
||
['Hand aufs Herz', 'Innere Ruhe – Blick nach innen.', 'Hand on Heart', 'Look inward – calm.'],
|
||
['Leises Lächeln', 'Ganz sanftes Lächeln.', 'Soft Smile', 'Very gentle smile.'],
|
||
['Fensterlicht', 'Seitliches Fensterlicht nutzen.', 'Window Light', 'Use side window light.'],
|
||
['Lesemoment', 'Jemand liest leise vor.', 'Reading Moment', 'Someone reads softly.'],
|
||
['Gebet/Wunsch', 'Ein stiller Wunsch oder Gebet.', 'Silent Wish', 'A quiet wish or prayer.'],
|
||
['Danke‑Geste', 'Dankbare Geste mit Blick zur Kamera.', 'Grateful Gesture', 'Grateful gesture to camera.'],
|
||
['Nahaufnahme Augen', 'Fokus auf die Augen.', 'Eyes Close‑Up', 'Focus on the eyes.'],
|
||
['Hand in Hand', 'Langsame Bewegung der Hände.', 'Hands Moving', 'Slow hand movement.'],
|
||
['Anlehnen', 'Lehnt euch sanft aneinander.', 'Lean Gently', 'Lean gently together.'],
|
||
['Still stehen', '30 Sekunden ganz ruhig stehen.', 'Stand Still', 'Stand very still.'],
|
||
['Licht & Schatten', 'Sanftes Spiel aus Licht/Schatten.', 'Light & Shadow', 'Soft light/shadow play.'],
|
||
['Aufrichtigkeit', 'Direkter, ruhiger Blick.', 'Sincere Look', 'Direct, calm look.'],
|
||
['Hauch von Lächeln', 'Nur ein Hauch – subtil.', 'Hint of Smile', 'Just a hint – subtle.'],
|
||
['Hände im Schoß', 'Entspannte Hände im Schoß.', 'Hands in Lap', 'Hands resting in lap.'],
|
||
['Stiller Kreis', 'Kleiner Kreis, Köpfe zusammen.', 'Quiet Circle', 'Small circle, heads together.'],
|
||
['Schulter‑Touch', 'Kurzer Schulterkontakt, Ruhe.', 'Shoulder Touch', 'Brief shoulder touch.'],
|
||
['Atem zählen', 'Zählt 3 Atemzüge gemeinsam.', 'Count Breaths', 'Count 3 breaths together.'],
|
||
['Augen schließen', 'Alle Augen schließen – Klick.', 'Eyes Closed', 'All close eyes – click.'],
|
||
],
|
||
];
|
||
|
||
// Difficulty rotation
|
||
$difficulties = ['easy','easy','medium','easy','medium','hard'];
|
||
|
||
foreach (Emotion::all() as $emotion) {
|
||
$name = is_array($emotion->name) ? ($emotion->name['de'] ?? array_values($emotion->name)[0]) : (string) $emotion->name;
|
||
$list = $catalog[$name] ?? null;
|
||
if (!$list) continue; // skip unknown emotion labels
|
||
|
||
$created = 0; $order = 1;
|
||
foreach ($list as $i => $row) {
|
||
[$deTitle, $deDesc, $enTitle, $enDesc] = $row;
|
||
|
||
// Avoid duplicates: check same DE title within this emotion
|
||
$exists = Task::where('emotion_id', $emotion->id)
|
||
->where('title->de', $deTitle)
|
||
->exists();
|
||
if ($exists) { $order++; continue; }
|
||
|
||
Task::create([
|
||
'tenant_id' => $demoTenant->id,
|
||
'emotion_id' => $emotion->id,
|
||
'event_type_id' => null,
|
||
'title' => ['de' => $deTitle, 'en' => $enTitle],
|
||
'description' => ['de' => $deDesc, 'en' => $enDesc],
|
||
'example_text' => ['de' => null, 'en' => null],
|
||
'difficulty' => $difficulties[$i % count($difficulties)],
|
||
'sort_order' => $order++,
|
||
'is_active' => true,
|
||
]);
|
||
$created++;
|
||
}
|
||
|
||
// Ensure at least 20: if list shorter (shouldn’t), cycle again with suffix
|
||
$i = 0;
|
||
while ($created < 20 && $i < count($list)) {
|
||
[$deTitle, $deDesc, $enTitle, $enDesc] = $list[$i];
|
||
$suffix = ' #' . ($created + 1);
|
||
Task::create([
|
||
'tenant_id' => $demoTenant->id,
|
||
'emotion_id' => $emotion->id,
|
||
'event_type_id' => null,
|
||
'title' => ['de' => $deTitle.$suffix, 'en' => $enTitle.$suffix],
|
||
'description' => ['de' => $deDesc, 'en' => $enDesc],
|
||
'example_text' => ['de' => null, 'en' => null],
|
||
'difficulty' => $difficulties[$created % count($difficulties)],
|
||
'sort_order' => $order++,
|
||
'is_active' => true,
|
||
]);
|
||
$created++; $i++;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|