add element descriptions

This commit is contained in:
Yisroel Baum 2026-05-26 21:12:28 +03:00
parent f2dc1483dd
commit 72e4720787
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
10 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('elements', function (Blueprint $table) {
$table->text('description')->default('');
});
}
public function down(): void
{
Schema::table('elements', function (Blueprint $table) {
$table->dropColumn('description');
});
}
};

View file

@ -17,16 +17,20 @@ class ElementSeeder extends Seeder
$rootElement = $elementRepository->create(new CreateElementDto(
set: $baderechSet,
title: $baderechSet->getName(),
description: $baderechSet->getDescription(),
parentElement: null,
));
$elementRepository->create(new CreateElementDto(
set: $baderechSet,
title: 'Avodah Foundations',
description: 'Core foundations for building a steady '
. 'avodah practice.',
parentElement: $rootElement,
));
$elementRepository->create(new CreateElementDto(
set: $baderechSet,
title: 'Daily Practice',
description: 'Practical steps for consistent daily growth.',
parentElement: $rootElement,
));
}