44 lines
1.6 KiB
PHP
44 lines
1.6 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>',
|
|
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>',
|
|
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>',
|
|
parentElement: $rootElement,
|
|
));
|
|
}
|
|
}
|