35 lines
1.2 KiB
PHP
35 lines
1.2 KiB
PHP
<?php
|
|
require_once __DIR__ . '/../db/config.php';
|
|
|
|
$delulus = [
|
|
[
|
|
'username' => 'DreamyDolphin',
|
|
'title' => 'Manifesting a trip to Japan',
|
|
'body' => 'I can already taste the ramen and see the cherry blossoms. My bags are packed (in my head).'
|
|
],
|
|
[
|
|
'username' => 'CosmicCat',
|
|
'title' => 'My cat is secretly a world-renowned philosopher',
|
|
'body' => 'He just sits there, judging my life choices. I am sure he is pondering the meaning of existence.'
|
|
],
|
|
[
|
|
'username' => 'StarlightSailor',
|
|
'title' => 'I am the main character',
|
|
'body' => 'The world is my movie, and I am just waiting for the plot twist. It is going to be epic.'
|
|
],
|
|
[
|
|
'username' => 'MoonbeamMoth',
|
|
'title' => 'My plants are my therapists',
|
|
'body' => 'They listen to all my problems and never talk back. Best therapy session ever.'
|
|
],
|
|
];
|
|
|
|
$pdo = db();
|
|
$stmt = $pdo->prepare('INSERT INTO delulus (username, title, body) VALUES (?, ?, ?)');
|
|
|
|
foreach ($delulus as $delulu) {
|
|
$stmt->execute([$delulu['username'], $delulu['title'], $delulu['body']]);
|
|
}
|
|
|
|
echo 'Database seeded successfully!';
|