route element file uploads
Add short and long PDF paths to elements, keep pdfPath as a short PDF compatibility alias, and route generic file uploads by fileType.
This commit is contained in:
parent
0d5783ba9c
commit
9bbabc7fa6
28 changed files with 686 additions and 214 deletions
|
|
@ -15,7 +15,8 @@ return new class extends Migration
|
|||
$table->text('description')->default('');
|
||||
$table->string('icon_image_url')->nullable();
|
||||
$table->text('rich_text')->default('');
|
||||
$table->string('pdf_path')->nullable();
|
||||
$table->string('short_pdf_path')->nullable();
|
||||
$table->string('long_pdf_path')->nullable();
|
||||
$table->string('youtube_url')->nullable();
|
||||
$table->foreignId('parent_element_id')
|
||||
->nullable()
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class ElementSeeder extends Seeder
|
|||
'element-icons/baderech-haavodah-icon.png',
|
||||
);
|
||||
$introductionPdfPath = $this->seedStorageFile(
|
||||
'element-pdfs/baderech.pdf',
|
||||
'element-pdfs/short/baderech.pdf',
|
||||
);
|
||||
|
||||
$rootElement = $elementRepository->create(new CreateElementDto(
|
||||
|
|
@ -29,7 +29,8 @@ class ElementSeeder extends Seeder
|
|||
description: $baderechSet->getDescription(),
|
||||
iconImageUrl: $rootIconImageUrl,
|
||||
richText: '',
|
||||
pdfPath: null,
|
||||
shortPdfPath: null,
|
||||
longPdfPath: null,
|
||||
youtubeUrl: null,
|
||||
parentElement: null,
|
||||
));
|
||||
|
|
@ -44,7 +45,7 @@ class ElementSeeder extends Seeder
|
|||
. 'unlock the ability to live with strength, confidence, '
|
||||
. 'and hope.',
|
||||
'richText' => $this->introductionRichText(),
|
||||
'pdfPath' => $introductionPdfPath,
|
||||
'shortPdfPath' => $introductionPdfPath,
|
||||
],
|
||||
[
|
||||
'title' => '2. Foundations',
|
||||
|
|
@ -54,7 +55,7 @@ class ElementSeeder extends Seeder
|
|||
. 'ability to uplift the physical world with spiritual '
|
||||
. 'intention.',
|
||||
'richText' => '',
|
||||
'pdfPath' => null,
|
||||
'shortPdfPath' => null,
|
||||
],
|
||||
[
|
||||
'title' => '3. Divine Plan',
|
||||
|
|
@ -62,14 +63,14 @@ class ElementSeeder extends Seeder
|
|||
. 'generation and the call to remain hopeful, '
|
||||
. 'optimistic, and resilient.',
|
||||
'richText' => '',
|
||||
'pdfPath' => null,
|
||||
'shortPdfPath' => null,
|
||||
],
|
||||
[
|
||||
'title' => '4. Architecture of the Soul',
|
||||
'description' => "Becoming a Baal Da'at - A Master of "
|
||||
. 'Inner Awareness',
|
||||
'richText' => '',
|
||||
'pdfPath' => null,
|
||||
'shortPdfPath' => null,
|
||||
],
|
||||
[
|
||||
'title' => '5. Arba Yesodot',
|
||||
|
|
@ -77,7 +78,7 @@ class ElementSeeder extends Seeder
|
|||
. 'Physical & Financial Health, Relationships, Wisdom '
|
||||
. 'and Guidance.',
|
||||
'richText' => '',
|
||||
'pdfPath' => null,
|
||||
'shortPdfPath' => null,
|
||||
],
|
||||
[
|
||||
'title' => '6. Fluid Integration',
|
||||
|
|
@ -85,7 +86,7 @@ class ElementSeeder extends Seeder
|
|||
. 'engender a shift in mindset, embed healthy routines, '
|
||||
. 'positive life practices.',
|
||||
'richText' => '',
|
||||
'pdfPath' => null,
|
||||
'shortPdfPath' => null,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
@ -97,7 +98,8 @@ class ElementSeeder extends Seeder
|
|||
description: $baderechChildElement['description'],
|
||||
iconImageUrl: null,
|
||||
richText: $baderechChildElement['richText'],
|
||||
pdfPath: $baderechChildElement['pdfPath'],
|
||||
shortPdfPath: $baderechChildElement['shortPdfPath'],
|
||||
longPdfPath: null,
|
||||
youtubeUrl: null,
|
||||
parentElement: $rootElement,
|
||||
));
|
||||
|
|
@ -117,7 +119,8 @@ class ElementSeeder extends Seeder
|
|||
description: '',
|
||||
iconImageUrl: null,
|
||||
richText: '',
|
||||
pdfPath: null,
|
||||
shortPdfPath: null,
|
||||
longPdfPath: null,
|
||||
youtubeUrl: 'https://www.youtube.com/watch?v='
|
||||
. 'yHx-r4p6hHU&t=1s',
|
||||
parentElement: $introductionElement,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue