51 lines
1.8 KiB
PHP
51 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Element\CreateElementDto;
|
|
use App\Element\ElementRepository;
|
|
use App\Set\SetRepository;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class ElementSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
$setRepository = app(SetRepository::class);
|
|
$elementRepository = app(ElementRepository::class);
|
|
$baderechSet = $setRepository->find(1);
|
|
$rootElement = $elementRepository->create(new CreateElementDto(
|
|
set: $baderechSet,
|
|
title: $baderechSet->getName(),
|
|
description: $baderechSet->getDescription(),
|
|
richText: '<p>Begin with a clear map for avodah growth.</p>'
|
|
. '<p><strong>Move steadily</strong> from awareness '
|
|
. 'to practice.</p>',
|
|
pdfPath: '/assets/pdfs/baderech.pdf',
|
|
youtubeUrl: 'https://www.youtube.com/watch?v='
|
|
. 'yHx-r4p6hHU&t=1s',
|
|
parentElement: null,
|
|
));
|
|
$elementRepository->create(new CreateElementDto(
|
|
set: $baderechSet,
|
|
title: 'Avodah Foundations',
|
|
description: 'Core foundations for building a steady '
|
|
. 'avodah practice.',
|
|
richText: '<p>Avodah foundations begin with honest awareness '
|
|
. 'and small repeatable steps.</p>',
|
|
pdfPath: null,
|
|
youtubeUrl: null,
|
|
parentElement: $rootElement,
|
|
));
|
|
$elementRepository->create(new CreateElementDto(
|
|
set: $baderechSet,
|
|
title: 'Daily Practice',
|
|
description: 'Practical steps for consistent daily growth.',
|
|
richText: '<p>Daily practice turns inspiration into a '
|
|
. 'dependable rhythm.</p>',
|
|
pdfPath: null,
|
|
youtubeUrl: null,
|
|
parentElement: $rootElement,
|
|
));
|
|
}
|
|
}
|