10-04-2026
This commit is contained in:
parent
4d6b4930b2
commit
4bb89aad8c
836 changed files with 52961 additions and 5950 deletions
|
|
@ -0,0 +1,28 @@
|
|||
<?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::create('flux_cms_contents', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('group')->index();
|
||||
$table->string('key');
|
||||
$table->string('type')->default('text');
|
||||
$table->json('value')->nullable();
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['group', 'key']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('flux_cms_contents');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?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::create('flux_cms_downloads', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->json('title');
|
||||
$table->json('description')->nullable();
|
||||
$table->string('category');
|
||||
$table->string('file_path')->nullable();
|
||||
$table->string('thumbnail')->nullable();
|
||||
$table->boolean('is_published')->default(true);
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('category');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('flux_cms_downloads');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?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::create('flux_cms_linkedin_posts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('linkedin_id')->nullable()->unique();
|
||||
$table->json('title');
|
||||
$table->json('excerpt')->nullable();
|
||||
$table->json('content')->nullable();
|
||||
$table->string('author')->nullable();
|
||||
$table->date('date')->nullable();
|
||||
$table->string('url')->nullable();
|
||||
$table->string('image')->nullable();
|
||||
$table->json('tags')->nullable();
|
||||
$table->string('source')->default('manual');
|
||||
$table->boolean('is_published')->default(true);
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('flux_cms_linkedin_posts');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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::create('flux_cms_faqs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('category')->index();
|
||||
$table->json('question');
|
||||
$table->json('answer');
|
||||
$table->json('help')->nullable();
|
||||
$table->boolean('is_published')->default(true);
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('flux_cms_faqs');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?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::create('flux_cms_news_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('icon')->nullable();
|
||||
$table->json('text');
|
||||
$table->json('title');
|
||||
$table->json('excerpt')->nullable();
|
||||
$table->json('content')->nullable();
|
||||
$table->string('image')->nullable();
|
||||
$table->date('date')->nullable();
|
||||
$table->string('author')->nullable();
|
||||
$table->string('link')->nullable();
|
||||
$table->string('pdf_path')->nullable();
|
||||
$table->json('pdf_open_text')->nullable();
|
||||
$table->json('pdf_download_text')->nullable();
|
||||
$table->boolean('is_published')->default(true);
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('flux_cms_news_items');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?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::create('flux_cms_industries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->json('name');
|
||||
$table->boolean('is_published')->default(true);
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('flux_cms_industries');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?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::create('flux_cms_media', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('filename');
|
||||
$table->string('disk')->default('public');
|
||||
$table->string('path');
|
||||
$table->string('type')->default('image');
|
||||
$table->string('mime_type')->nullable();
|
||||
$table->unsignedBigInteger('file_size')->default(0);
|
||||
$table->unsignedInteger('original_width')->nullable();
|
||||
$table->unsignedInteger('original_height')->nullable();
|
||||
$table->json('alt_text')->nullable();
|
||||
$table->json('title')->nullable();
|
||||
$table->string('collection')->nullable()->index();
|
||||
$table->json('conversions')->nullable();
|
||||
$table->boolean('is_published')->default(true);
|
||||
$table->unsignedInteger('order')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['type', 'collection']);
|
||||
$table->index('is_published');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('flux_cms_media');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?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::create('flux_cms_search_index', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('item_id')->unique();
|
||||
$table->string('route');
|
||||
$table->json('route_params')->nullable();
|
||||
$table->json('category');
|
||||
$table->string('title_key')->nullable();
|
||||
$table->json('title_fallback')->nullable();
|
||||
$table->string('description_key')->nullable();
|
||||
$table->string('description_fallback_key')->nullable();
|
||||
$table->json('description_fallback_text')->nullable();
|
||||
$table->json('keywords');
|
||||
$table->boolean('is_published')->default(true);
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('flux_cms_search_index');
|
||||
}
|
||||
};
|
||||
|
|
@ -29,4 +29,4 @@ return new class extends Migration
|
|||
{
|
||||
Schema::dropIfExists('flux_cms_page_components');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
@ -30,4 +30,4 @@ return new class extends Migration
|
|||
{
|
||||
Schema::dropIfExists('flux_cms_page_versions');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
@ -27,4 +27,4 @@ return new class extends Migration
|
|||
{
|
||||
Schema::dropIfExists('flux_cms_navigations');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
@ -32,4 +32,4 @@ return new class extends Migration
|
|||
{
|
||||
Schema::dropIfExists('flux_cms_navigation_items');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use FluxCms\Core\Models\CmsContent;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class CmsContentSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Files to skip entirely (handled by dedicated seeders or irrelevant).
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected array $skipFiles = [
|
||||
'faqs',
|
||||
'sections',
|
||||
'search_index',
|
||||
'validation',
|
||||
'auth',
|
||||
'passwords',
|
||||
'pagination',
|
||||
];
|
||||
|
||||
/**
|
||||
* Keys to skip within specific groups (handled by dedicated models).
|
||||
*
|
||||
* @var array<string, array<string>>
|
||||
*/
|
||||
protected array $skipKeys = [
|
||||
'components' => ['news_band', 'industries_band'],
|
||||
];
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
$locales = ['de', 'en'];
|
||||
|
||||
$deFiles = glob(lang_path('de/*.php'));
|
||||
if (! $deFiles) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($deFiles as $filePath) {
|
||||
$group = pathinfo($filePath, PATHINFO_FILENAME);
|
||||
|
||||
if (in_array($group, $this->skipFiles)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$translations = [];
|
||||
foreach ($locales as $locale) {
|
||||
$localePath = lang_path("{$locale}/{$group}.php");
|
||||
if (file_exists($localePath)) {
|
||||
$translations[$locale] = require $localePath;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($translations)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$deData = $translations['de'] ?? [];
|
||||
$enData = $translations['en'] ?? [];
|
||||
|
||||
$flatDe = $this->flatten($deData);
|
||||
$flatEn = $this->flatten($enData);
|
||||
|
||||
$allKeys = array_keys($flatDe);
|
||||
foreach (array_keys($flatEn) as $enKey) {
|
||||
if (! in_array($enKey, $allKeys)) {
|
||||
$allKeys[] = $enKey;
|
||||
}
|
||||
}
|
||||
|
||||
$order = 0;
|
||||
foreach ($allKeys as $key) {
|
||||
if ($this->shouldSkipKey($group, $key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$deValue = $flatDe[$key] ?? null;
|
||||
$enValue = $flatEn[$key] ?? null;
|
||||
|
||||
$type = $this->detectType($deValue ?? $enValue);
|
||||
|
||||
$translatedValue = [];
|
||||
if ($deValue !== null) {
|
||||
$translatedValue['de'] = is_string($deValue) ? $this->cleanHtml($deValue) : $deValue;
|
||||
}
|
||||
if ($enValue !== null) {
|
||||
$translatedValue['en'] = is_string($enValue) ? $this->cleanHtml($enValue) : $enValue;
|
||||
}
|
||||
|
||||
CmsContent::updateOrCreate(
|
||||
['group' => $group, 'key' => $key],
|
||||
[
|
||||
'type' => $type,
|
||||
'value' => $translatedValue,
|
||||
'order' => $order++,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flatten a nested array into dot-notation keys.
|
||||
* Arrays of objects (indexed arrays) are stored as JSON type.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
protected function flatten(array $array, string $prefix = ''): array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ($array as $key => $value) {
|
||||
$fullKey = $prefix ? "{$prefix}.{$key}" : (string) $key;
|
||||
|
||||
if (is_array($value) && ! Arr::isAssoc($value)) {
|
||||
$result[$fullKey] = $value;
|
||||
} elseif (is_array($value)) {
|
||||
$result = array_merge($result, $this->flatten($value, $fullKey));
|
||||
} else {
|
||||
$result[$fullKey] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function detectType(mixed $value): string
|
||||
{
|
||||
if (is_array($value)) {
|
||||
return 'json';
|
||||
}
|
||||
|
||||
if (! is_string($value)) {
|
||||
return 'text';
|
||||
}
|
||||
|
||||
if (preg_match('/<[a-z][\s\S]*>/i', $value)) {
|
||||
return 'html';
|
||||
}
|
||||
|
||||
if (preg_match('/\.(jpg|jpeg|png|gif|webp|svg)(\?.*)?$/i', $value)) {
|
||||
return 'image';
|
||||
}
|
||||
|
||||
if (preg_match('/\.(pdf|doc|docx)$/i', $value)) {
|
||||
return 'link';
|
||||
}
|
||||
|
||||
return 'text';
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean HTML by converting font-weight spans to <strong> tags.
|
||||
* Preserves text-gradient-premium spans and email-protection spans.
|
||||
*/
|
||||
protected function cleanHtml(string $value): string
|
||||
{
|
||||
$value = preg_replace(
|
||||
'/<span\s+class="[^"]*(?:font-semibold|font-bold)[^"]*">(\s*)(.*?)<\/span>/si',
|
||||
'$1<strong>$2</strong>',
|
||||
$value
|
||||
);
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function shouldSkipKey(string $group, string $key): bool
|
||||
{
|
||||
if (! isset($this->skipKeys[$group])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($this->skipKeys[$group] as $skipPrefix) {
|
||||
if ($key === $skipPrefix || str_starts_with($key, "{$skipPrefix}.")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use FluxCms\Core\Models\CmsDownload;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CmsDownloadSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$items = $this->getItems();
|
||||
|
||||
foreach ($items as $index => $item) {
|
||||
CmsDownload::updateOrCreate(
|
||||
[
|
||||
'category' => $item['category'],
|
||||
'order' => $index,
|
||||
],
|
||||
[
|
||||
'title' => $item['title'],
|
||||
'description' => $item['description'],
|
||||
'icon' => $item['icon'],
|
||||
'sub_category' => $item['sub_category'],
|
||||
'type_label' => $item['type_label'],
|
||||
'alt' => $item['alt'],
|
||||
'thumbnail' => $item['thumbnail'],
|
||||
'file_path' => $item['file_path'],
|
||||
'open_text' => $item['open_text'],
|
||||
'download_text' => $item['download_text'],
|
||||
'highlights' => $item['highlights'] ?? null,
|
||||
'checkpoints' => $item['checkpoints'] ?? null,
|
||||
'is_published' => true,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
private function getItems(): array
|
||||
{
|
||||
return [
|
||||
// === Case Studies ===
|
||||
[
|
||||
'category' => 'case_study',
|
||||
'title' => ['de' => 'Hair-Care R&D Product Support', 'en' => 'Hair-Care R&D Product Support'],
|
||||
'description' => ['de' => 'Ein globaler FMCG-Kunde im Bereich Hair Care musste eine komplexe R&D-Roadmap umsetzen und wir die Koordination von rund 5 parallelen Entwicklungsinitiativen koordinierten.', 'en' => 'A global FMCG client in the hair care segment needed to implement a complex R&D roadmap. We coordinated approximately 5 parallel development initiatives.'],
|
||||
'icon' => 'document-chart-bar',
|
||||
'sub_category' => 'R&D Product Support',
|
||||
'type_label' => ['de' => 'Case Study', 'en' => 'Case Study'],
|
||||
'alt' => ['de' => 'Case Study Hair-Care R&D Product Support', 'en' => 'Case Study Hair-Care R&D Product Support'],
|
||||
'thumbnail' => 'case-study-7011.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Case_Study_7011_HairCareRD_ProductSupport_de.pdf', 'en' => 'inno-projekt-Case_Study_7011_HairCareRD_ProductSupport_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'highlights' => [['value' => '100%', 'label' => 'Dokumentations-<br>konformität'], ['value' => '5', 'label' => 'parallele<br>Entwicklungsinitiativen']],
|
||||
],
|
||||
[
|
||||
'category' => 'case_study',
|
||||
'title' => ['de' => 'Lab Support Data Integration', 'en' => 'Lab Support Data Integration'],
|
||||
'description' => ['de' => 'Eie wir für einen globalen FMCG-Player die Verpackungsvalidierung standardisierten und durch direkte Systemintegration die "Time-to-Result" signifikant beschleunigten.', 'en' => 'How we standardized packaging validation for a global FMCG player and significantly accelerated "Time-to-Result" through direct system integration.'],
|
||||
'icon' => 'document-chart-bar',
|
||||
'sub_category' => 'Lab Support Data Integration',
|
||||
'type_label' => ['de' => 'Case Study', 'en' => 'Case Study'],
|
||||
'alt' => ['de' => 'Case Study Lab Support Data Integration', 'en' => 'Case Study Lab Support Data Integration'],
|
||||
'thumbnail' => 'case-study-7012.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Case_Study_7012_LabSupport_DataIntegration_de.pdf', 'en' => 'inno-projekt-Case_Study_7012_LabSupport_DataIntegration_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'highlights' => [['value' => '20%', 'label' => 'Zeitgewinn'], ['value' => '100%', 'label' => 'Systemintegration<br> ']],
|
||||
],
|
||||
[
|
||||
'category' => 'case_study',
|
||||
'title' => ['de' => 'Fragrance Pump Experience', 'en' => 'Fragrance Pump Experience'],
|
||||
'description' => ['de' => 'Wie wir für einen internationalen Premium-Konzern das subjektive Sprühgefühl von Parfüm in belastbare Ingenieursdaten übersetzten und das perfekte Markenerlebnis definierten.', 'en' => 'How we translated the subjective spray feel of perfume into robust engineering data for an international premium corporation and defined the perfect brand experience.'],
|
||||
'icon' => 'document-chart-bar',
|
||||
'sub_category' => 'Fragrance Pump Experience',
|
||||
'type_label' => ['de' => 'Case Study', 'en' => 'Case Study'],
|
||||
'alt' => ['de' => 'Case Study Fragrance Pump Experience', 'en' => 'Case Study Fragrance Pump Experience'],
|
||||
'thumbnail' => 'case-study-7013.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Case_Study_7013_FragrancePump_Experience_de.pdf', 'en' => 'inno-projekt-Case_Study_7013_FragrancePump_Experience_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'highlights' => [['value' => '∞', 'label' => 'Objektivierung-<br>von Emotionen'], ['value' => '∞', 'label' => 'Globale<br>Differenzierung']],
|
||||
],
|
||||
[
|
||||
'category' => 'case_study',
|
||||
'title' => ['de' => 'Master Data Excellence & Prozess-Outsourcing', 'en' => 'Master Data Excellence & Process Outsourcing'],
|
||||
'description' => ['de' => 'Ein globaler FMCG-Konzern stand vor der Herausforderung, seine internen F&E-Teams von hochadministrativem Aufwand zu befreien', 'en' => 'A global FMCG corporation faced the challenge of relieving its internal R&D teams from highly administrative workload.'],
|
||||
'icon' => 'document-chart-bar',
|
||||
'sub_category' => 'Master Data Excellence',
|
||||
'type_label' => ['de' => 'Case Study', 'en' => 'Case Study'],
|
||||
'alt' => ['de' => 'Case Study Master Data Excellence & Prozess-Outsourcing', 'en' => 'Case Study Master Data Excellence & Process Outsourcing'],
|
||||
'thumbnail' => 'case-study-7010.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Case_Study_7010_MasterDataExcellence_de.pdf', 'en' => 'inno-projekt-Case_Study_7010_MasterDataExcellence_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'highlights' => [['value' => '~60%', 'label' => 'Zeitgewinn'], ['value' => '20-25%', 'label' => 'Kosteneffizienz<br> ']],
|
||||
],
|
||||
// === Capabilities ===
|
||||
[
|
||||
'category' => 'capability',
|
||||
'title' => ['de' => 'Global Player', 'en' => 'Global Player'],
|
||||
'description' => ['de' => 'Beherrschen Sie globale Komplexität. Skalieren Sie Innovationen sicher über Märkte und Werke hinweg.', 'en' => 'Master global complexity. Scale innovations safely across markets and plants.'],
|
||||
'icon' => 'document-text',
|
||||
'sub_category' => 'Globale Player & Internationale Projekte',
|
||||
'type_label' => ['de' => 'Capability', 'en' => 'Capability'],
|
||||
'alt' => ['de' => 'Capability Profile Global Player', 'en' => 'Capability Profile Global Player'],
|
||||
'thumbnail' => 'global-player.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Capability_9101_GlobalPlayer_de.pdf', 'en' => 'inno-projekt-Capability_9101_GlobalPlayer_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'checkpoints' => [['value' => 'Etablieren Sie globale Exzellenz'], ['value' => 'Sichern Sie Ihre "License to Operate"'], ['value' => 'Synchronisieren Sie Zentrale und Werke']],
|
||||
],
|
||||
[
|
||||
'category' => 'capability',
|
||||
'title' => ['de' => 'Nationale Champions', 'en' => 'National Champions'],
|
||||
'description' => ['de' => 'Realisieren Sie große Ideen mit pragmatischer Schlagkraft. Nutzen Sie bewährte Methoden maßgeschneidert für Ihre Strukturen.', 'en' => 'Turn big ideas into reality with pragmatic impact. Use proven methods tailored to your structures.'],
|
||||
'icon' => 'document-text',
|
||||
'sub_category' => 'Nationale Champions & Regionale Akteure',
|
||||
'type_label' => ['de' => 'Capability', 'en' => 'Capability'],
|
||||
'alt' => ['de' => 'Capability Profile Nationale Champions', 'en' => 'Capability Profile National Champions'],
|
||||
'thumbnail' => 'nationale-champions.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Capability_9102_NationaleChampions_de.pdf', 'en' => 'inno-projekt-Capability_9102_NationalChampions_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'checkpoints' => [['value' => 'Erweitern Sie Ihre Handlungsfähigkeit'], ['value' => 'Profitieren Sie von Best-Practices'], ['value' => 'Steigern Sie Ihre Marge']],
|
||||
],
|
||||
[
|
||||
'category' => 'capability',
|
||||
'title' => ['de' => 'Leistungsübersicht', 'en' => 'Service Overview'],
|
||||
'description' => ['de' => 'Bündeln Sie Ihre Anforderungen. Wir bieten Ihnen ein integriertes Spektrum aus Packaging, Engineering, Projektmanagement und spezialisiertem Consulting.', 'en' => 'We offer you an integrated spectrum of Packaging, Engineering, Project Management and specialized consulting.'],
|
||||
'icon' => 'document-text',
|
||||
'sub_category' => 'Ihr Leistungsportfolio für technische Exzellenz.',
|
||||
'type_label' => ['de' => 'Capability', 'en' => 'Capability'],
|
||||
'alt' => ['de' => 'Capability Leistungsübersicht', 'en' => 'Capability Service Overview for Technical Excellence'],
|
||||
'thumbnail' => 'keyvisual.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Capability_9202_Leistungsuebersicht_de.pdf', 'en' => 'inno-projekt-Capability_9202_Service_Overview_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'checkpoints' => [['value' => 'Ihre Buchungsmodelle'], ['value' => 'Verfügbare Experten-Rollen'], ['value' => 'Warum inno-projekt?']],
|
||||
],
|
||||
[
|
||||
'category' => 'capability',
|
||||
'title' => ['de' => 'Master Data Management', 'en' => 'Master Data Management'],
|
||||
'description' => ['de' => 'Erfahren Sie mehr über unsere Expertise im Bereich Master Data Management und Systemintegration für FMCG-Unternehmen.', 'en' => 'Learn more about our expertise in master data management and system integration for FMCG companies.'],
|
||||
'icon' => 'document-text',
|
||||
'sub_category' => 'Verwandeln Sie Datenchaos in Prozessgeschwindigkeit.',
|
||||
'type_label' => ['de' => 'Capability', 'en' => 'Capability'],
|
||||
'alt' => ['de' => 'Capability Profile Master Data Management', 'en' => 'Capability Profile Master Data Management'],
|
||||
'thumbnail' => 'leistung-2.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Capability_9012_MasterData_de.pdf', 'en' => 'inno-projekt-Capability_9012_MasterData_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'checkpoints' => [['value' => 'Entlasten Sie Ihre Experten'], ['value' => 'Beschleunigen Sie Ihren Markteintritt'], ['value' => 'Garantieren Sie Compliance']],
|
||||
],
|
||||
[
|
||||
'category' => 'capability',
|
||||
'title' => ['de' => 'Integrated Consumer Research', 'en' => 'Integrated Consumer Research'],
|
||||
'description' => ['de' => 'Erfahren Sie mehr über unsere Expertise im Bereich Integrated Consumer Research für FMCG-Unternehmen.', 'en' => 'Learn more about our expertise in integrated consumer research for FMCG companies.'],
|
||||
'icon' => 'document-text',
|
||||
'sub_category' => 'Verwandeln Sie subjektives Erleben in messbare technische Daten.',
|
||||
'type_label' => ['de' => 'Capability', 'en' => 'Capability'],
|
||||
'alt' => ['de' => 'Capability Integrated Consumer Research', 'en' => 'Capability Integrated Consumer Research'],
|
||||
'thumbnail' => 'leistung-2.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Capability_9011_Integrated_Consumer_Research_de.pdf', 'en' => 'inno-projekt-Capability_9011_Integrated_Consumer_Research_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF downloaden', 'en' => 'Download PDF'],
|
||||
'checkpoints' => [['value' => 'Minimieren Sie Fehlentwicklungen'], ['value' => 'Machen Sie Markenwerte messbar'], ['value' => 'Verstehen Sie Ihre "Emotional Map"']],
|
||||
],
|
||||
// === Success Stories ===
|
||||
[
|
||||
'category' => 'success_story',
|
||||
'title' => ['de' => 'Lab Support Data Integration', 'en' => 'Lab Support Data Integration'],
|
||||
'description' => ['de' => 'Eie wir für einen globalen FMCG-Player die Verpackungsvalidierung standardisierten und durch direkte Systemintegration die "Time-to-Result" signifikant beschleunigten.', 'en' => 'How we standardized packaging validation for a global FMCG player and significantly accelerated "Time-to-Result" through direct system integration.'],
|
||||
'icon' => 'document-chart-bar',
|
||||
'sub_category' => 'Lab Support Data Integration',
|
||||
'type_label' => ['de' => 'Case Study', 'en' => 'Case Study'],
|
||||
'alt' => ['de' => 'Case Study Lab Support Data Integration', 'en' => 'Case Study Lab Support Data Integration'],
|
||||
'thumbnail' => 'case-study-7012.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Case_Study_7012_LabSupport_DataIntegration_de.pdf', 'en' => 'inno-projekt-Case_Study_7012_LabSupport_DataIntegration_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF herunterladen', 'en' => 'Download PDF'],
|
||||
'highlights' => [['value' => '20%', 'label' => 'Zeitgewinn'], ['value' => '100%', 'label' => 'Systemintegration<br> ']],
|
||||
],
|
||||
[
|
||||
'category' => 'success_story',
|
||||
'title' => ['de' => 'Fragrance Pump Experience', 'en' => 'Fragrance Pump Experience'],
|
||||
'description' => ['de' => 'Wie wir für einen internationalen Premium-Konzern das subjektive Sprühgefühl von Parfüm in belastbare Ingenieursdaten übersetzten und das perfekte Markenerlebnis definierten.', 'en' => 'How we translated the subjective spray feel of perfume into robust engineering data for an international premium corporation and defined the perfect brand experience.'],
|
||||
'icon' => 'document-chart-bar',
|
||||
'sub_category' => 'Fragrance Pump Experience',
|
||||
'type_label' => ['de' => 'Case Study', 'en' => 'Case Study'],
|
||||
'alt' => ['de' => 'Case Study Fragrance Pump Experience', 'en' => 'Case Study Fragrance Pump Experience'],
|
||||
'thumbnail' => 'case-study-7013.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Case_Study_7013_FragrancePump_Experience_de.pdf', 'en' => 'inno-projekt-Case_Study_7013_FragrancePump_Experience_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF herunterladen', 'en' => 'Download PDF'],
|
||||
'highlights' => [['value' => '∞', 'label' => 'Objektivierung-<br>von Emotionen'], ['value' => '∞', 'label' => 'Globale<br>Differenzierung']],
|
||||
],
|
||||
[
|
||||
'category' => 'success_story',
|
||||
'title' => ['de' => 'Master Data Excellence & Prozess-Outsourcing', 'en' => 'Master Data Excellence & Process Outsourcing'],
|
||||
'description' => ['de' => 'Ein globaler FMCG-Konzern stand vor der Herausforderung, seine internen F&E-Teams von hochadministrativem Aufwand zu befreien', 'en' => 'A global FMCG corporation faced the challenge of relieving its internal R&D teams from highly administrative workload.'],
|
||||
'icon' => 'document-chart-bar',
|
||||
'sub_category' => 'Master Data Excellence',
|
||||
'type_label' => ['de' => 'Case Study', 'en' => 'Case Study'],
|
||||
'alt' => ['de' => 'Case Study Master Data Excellence & Prozess-Outsourcing', 'en' => 'Case Study Master Data Excellence & Process Outsourcing'],
|
||||
'thumbnail' => 'case-study-7010.webp',
|
||||
'file_path' => ['de' => 'inno-projekt-Case_Study_7010_MasterDataExcellence_de.pdf', 'en' => 'inno-projekt-Case_Study_7010_MasterDataExcellence_en.pdf'],
|
||||
'open_text' => ['de' => 'PDF öffnen', 'en' => 'Open PDF'],
|
||||
'download_text' => ['de' => 'PDF herunterladen', 'en' => 'Download PDF'],
|
||||
'highlights' => [['value' => '~60%', 'label' => 'Zeitgewinn'], ['value' => '20-25%', 'label' => 'Kosteneffizienz<br> ']],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use FluxCms\Core\Models\CmsFaq;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CmsFaqSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$locales = ['de', 'en'];
|
||||
$faqsByLocale = [];
|
||||
|
||||
foreach ($locales as $locale) {
|
||||
$path = lang_path("{$locale}/faqs.php");
|
||||
if (file_exists($path)) {
|
||||
$faqsByLocale[$locale] = require $path;
|
||||
}
|
||||
}
|
||||
|
||||
$deData = $faqsByLocale['de'] ?? [];
|
||||
$enData = $faqsByLocale['en'] ?? [];
|
||||
|
||||
$allCategories = array_unique(array_merge(array_keys($deData), array_keys($enData)));
|
||||
|
||||
foreach ($allCategories as $category) {
|
||||
$deCategory = $deData[$category] ?? [];
|
||||
$enCategory = $enData[$category] ?? [];
|
||||
|
||||
$deItems = $deCategory['items'] ?? [];
|
||||
$enItems = $enCategory['items'] ?? [];
|
||||
|
||||
$maxCount = max(count($deItems), count($enItems));
|
||||
|
||||
for ($i = 0; $i < $maxCount; $i++) {
|
||||
$de = $deItems[$i] ?? [];
|
||||
$en = $enItems[$i] ?? [];
|
||||
|
||||
CmsFaq::create([
|
||||
'category' => $category,
|
||||
'question' => array_filter([
|
||||
'de' => $de['question'] ?? null,
|
||||
'en' => $en['question'] ?? null,
|
||||
]),
|
||||
'answer' => array_filter([
|
||||
'de' => $de['answer'] ?? null,
|
||||
'en' => $en['answer'] ?? null,
|
||||
]),
|
||||
'help' => array_filter([
|
||||
'de' => $de['help'] ?? null,
|
||||
'en' => $en['help'] ?? null,
|
||||
]) ?: null,
|
||||
'is_published' => true,
|
||||
'order' => $i,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use FluxCms\Core\Models\CmsIndustry;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CmsIndustrySeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$locales = ['de', 'en'];
|
||||
$industriesByLocale = [];
|
||||
|
||||
foreach ($locales as $locale) {
|
||||
$path = lang_path("{$locale}/components.php");
|
||||
if (file_exists($path)) {
|
||||
$data = require $path;
|
||||
$industriesByLocale[$locale] = $data['industries_band']['industries'] ?? [];
|
||||
}
|
||||
}
|
||||
|
||||
$deIndustries = $industriesByLocale['de'] ?? [];
|
||||
$enIndustries = $industriesByLocale['en'] ?? [];
|
||||
|
||||
$maxCount = max(count($deIndustries), count($enIndustries));
|
||||
|
||||
for ($i = 0; $i < $maxCount; $i++) {
|
||||
CmsIndustry::updateOrCreate(
|
||||
['order' => $i],
|
||||
[
|
||||
'name' => array_filter([
|
||||
'de' => $deIndustries[$i] ?? null,
|
||||
'en' => $enIndustries[$i] ?? null,
|
||||
]),
|
||||
'is_published' => true,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use FluxCms\Core\Models\CmsLinkedinPost;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CmsLinkedinPostSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$posts = $this->getFallbackPosts();
|
||||
|
||||
foreach ($posts as $index => $post) {
|
||||
CmsLinkedinPost::updateOrCreate(
|
||||
['linkedin_id' => $post['id'] ?? null],
|
||||
[
|
||||
'title' => ['de' => $post['title'], 'en' => $post['title']],
|
||||
'excerpt' => ['de' => $post['excerpt'], 'en' => $post['excerpt']],
|
||||
'content' => ['de' => $post['content'], 'en' => $post['content']],
|
||||
'author' => $post['author'] ?? 'inno-projekt',
|
||||
'date' => $post['date'] ?? null,
|
||||
'url' => $post['url'] ?? null,
|
||||
'image' => $post['image'] ?? null,
|
||||
'tags' => $post['tags'] ?? [],
|
||||
'source' => 'manual',
|
||||
'is_published' => true,
|
||||
'order' => $index,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
protected function getFallbackPosts(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'id' => '1',
|
||||
'title' => 'How to relieve your project management team and accelerate projects.',
|
||||
'excerpt' => 'Project managers in the FMCG sector often find themselves caught between two stools...',
|
||||
'content' => '<strong>How to relieve your project management team and accelerate projects.</strong><br><br>Project managers in the FMCG sector often find themselves caught between two stools: they are expected to meet the strategic expectations of management while at the same time solving operational problems on the front line.',
|
||||
'date' => '2026-01-13',
|
||||
'author' => 'inno-projekt',
|
||||
'tags' => ['Update', 'LinkedIn'],
|
||||
'url' => 'https://www.linkedin.com/posts/inno-projekt-gmbh_how-to-relieve-your-project-management-team-activity-7416741386902790144-dfJf',
|
||||
'image' => 'post-1.jpeg',
|
||||
],
|
||||
[
|
||||
'id' => '2',
|
||||
'title' => '2026 will be a clearly defined stress test for many packaging concepts.',
|
||||
'excerpt' => 'From August 12, 2026, the new EU Packaging Regulation (PPWR) will be largely binding...',
|
||||
'content' => '<strong>2026 will be a clearly defined stress test for many packaging concepts, primarily due to one thing:</strong><br><br>From August 12, 2026, the new EU Packaging Regulation (PPWR) will be largely binding.',
|
||||
'date' => '2026-01-09',
|
||||
'author' => 'inno-projekt',
|
||||
'tags' => ['Update', 'LinkedIn'],
|
||||
'url' => 'https://www.linkedin.com/posts/inno-projekt-gmbh_2026-will-be-a-clearly-defined-stress-test-activity-7414929446262018049-2JjY',
|
||||
'image' => 'post-2.jpeg',
|
||||
],
|
||||
[
|
||||
'id' => '3',
|
||||
'title' => 'For many, the new working year is beginning these days.',
|
||||
'excerpt' => 'For us, it is time to take on responsibility again...',
|
||||
'content' => '<strong>For many, the new working year is beginning these days.</strong><br><br>For us, it is time to take on responsibility again.',
|
||||
'date' => '2026-01-02',
|
||||
'author' => 'inno-projekt',
|
||||
'tags' => ['Update', 'LinkedIn'],
|
||||
'url' => 'https://www.linkedin.com/posts/inno-projekt-gmbh_for-many-the-new-working-year-is-beginning-activity-7414204668291059712-MfKU',
|
||||
'image' => 'post-3.jpeg',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use FluxCms\Core\Models\CmsContent;
|
||||
use FluxCms\Core\Models\CmsMedia;
|
||||
use FluxCms\Core\Services\MediaConversionService;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class CmsMediaSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$mediaItems = [
|
||||
['filename' => 'success-1.webp', 'path' => 'cms/media/originals/Q1qptIeXjLHi2l05i9ovwVka7uVKmyHnYBh3xQN6.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 30960, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'success-2.webp', 'path' => 'cms/media/originals/btwUGqS3gj45hjnPelRu9uXfyUvACKsU81C7efZk.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 31870, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'success-3.webp', 'path' => 'cms/media/originals/s13wFweUaQytN4tDlLXjuEr4VEIuXDFPElVS43hg.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 46794, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'team.webp', 'path' => 'cms/media/originals/cUs47da887T1ZfkrHXTGbTE45LEAy6S8421E4YvD.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 33650, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'save-pillar-1.webp', 'path' => 'cms/media/originals/G5eDDfenyKtbRiP1w1QT79EANtdArogAOmYc402W.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 42774, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'save-pillar-2.webp', 'path' => 'cms/media/originals/hlhfRpV5GYKZCA9KSgJG8dY3ItULKn8o1SySxRUu.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 52858, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'save-pillar-3.webp', 'path' => 'cms/media/originals/X0FHC9ieaxBzYqR5Af9ZagqPUPZTA26zz0bU2CKo.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 48472, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'story-logo.webp', 'path' => 'cms/media/originals/Q8VL2F3lBmLQ30tWq3KZf1eeP3XUXgzAKHSaJQ8z.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 9796, 'original_width' => 768, 'original_height' => 370],
|
||||
['filename' => 'story-taob.webp', 'path' => 'cms/media/originals/tlMQPvaP4t4nn3dM2C1njMLghPui8CjTLYXswwBP.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 6770, 'original_width' => 768, 'original_height' => 300],
|
||||
['filename' => 'mittelstand.webp', 'path' => 'cms/media/originals/me3XNKIxWVw5pNhEZldm8GEN6CUvN4wjtm7ElGfx.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 51880, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'mittelstand1.webp', 'path' => 'cms/media/originals/V5MFyj8JWMo6WaBqfJJmqCA9drykvC65349RnU9H.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 51880, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'nationale-champions.webp', 'path' => 'cms/media/originals/LTSgeytA3mncxZxdXD5SlULD6EBcTiZCwuaDJ89w.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 66366, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'projekte1.webp', 'path' => 'cms/media/originals/0MPvcE7cpGeDe64JCWaF3heCQetvU0cOpGYZnvXf.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 51146, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'leistung-1.webp', 'path' => 'cms/media/originals/oVi2TrTyITKKGD22wjfhcjopgDzMofFqO2XX0Mh1.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 42336, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'leistung-2.webp', 'path' => 'cms/media/originals/tVbL57cQkrKSQIkG1WWk9jOt4z9RiZUobLit5vpt.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 87448, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'leistung-3.webp', 'path' => 'cms/media/originals/e7mwnJSowDbCjxQimayoUP0tZAOkzvT7y1LQjqYp.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 49824, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'leistung-4.webp', 'path' => 'cms/media/originals/JHCKZVE1c9dor97PfD6yQhjkmd7PIJqwkilVBXAV.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 51996, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'leistung-5.webp', 'path' => 'cms/media/originals/FCElmkfJ0Qacp7vQRMeR1J5s9oxjRNdcFEVyoOJE.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 48686, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'leistungen-4.webp', 'path' => 'cms/media/originals/pbbDLBoYBI0I8Quzy0L9rHkmMzc3O78xmG9ZccRS.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 51996, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'leistungen.webp', 'path' => 'cms/media/originals/ggwLmiykMRovYcMExdvHRRmUrkJrxMCpF5ZfOXJT.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 51018, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'karriere1.webp', 'path' => 'cms/media/originals/KvaAufDevlUTVWQhQI5dsE6mVxORB063I8wmd1L1.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 44516, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'keyvisual-small.webp', 'path' => 'cms/media/originals/MHnntV48r17drkJIKZna9NG5Zqye62ypAFSA90L6.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 35164, 'original_width' => 960, 'original_height' => 400],
|
||||
['filename' => 'keyvisual.webp', 'path' => 'cms/media/originals/ma1SzM8v4l4pQeVGhrJ80bYxq2bBnuRC7C1hwNSV.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 9762, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'kontakt.webp', 'path' => 'cms/media/originals/3r2ugopYW4Rbiups57eNdzrjpqPvQYc19oVEoUap.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 33692, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'grosskonzerne.webp', 'path' => 'cms/media/originals/NBSE2qKQ1uZChAgVNAYespoLKVBzYYtAE96AoK1o.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 47772, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'integration-process.webp', 'path' => 'cms/media/originals/nqOmw0aYAvY0QP1OCfMvrl9B3rpIsDIRPuyNvoxz.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 54274, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'karriere.webp', 'path' => 'cms/media/originals/V9Nkxj9ViC90a6kO6Qcg5UYWZpA3YkNBUEAyi2d0.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 45306, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'dirigent.webp', 'path' => 'cms/media/originals/ZdIjdXC5QMhAqhqluKLlOEB4Qi9LjqWz5BCOhTPw.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 40648, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'global-player.webp', 'path' => 'cms/media/originals/TJj3114VYbME1b5Mz3KZ8OWwEvByXMNdHkAggzud.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 40444, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'case-study-7010.webp', 'path' => 'cms/media/originals/ZbRnWxUI5K15CyistdZ0wxRojDoqeYHAeomVehx3.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 70382, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'case-study-7011.webp', 'path' => 'cms/media/originals/9b0tmCAz0msWZaCl1EPFKnu0fzs1HOwHEiiQPixo.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 53120, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'case-study-7012.webp', 'path' => 'cms/media/originals/DPVmai1rcxWxYwUPL9J0ON3AYvAe9tGOTeyEanLC.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 55586, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'case-study-7013.webp', 'path' => 'cms/media/originals/mLtyPzKJRbDeciSBdKRwxgy9fHQQr7sySdrgHD7L.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 52752, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'capability-global-player.webp', 'path' => 'cms/media/originals/Io8eU0kzezXhAC3nUD0c0udqqEYzU6UG2wDJUzOr.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 28912, 'original_width' => 768, 'original_height' => 300],
|
||||
['filename' => 'capability-national-champions.webp', 'path' => 'cms/media/originals/5WFTRenjgq8ZMS1w5zhPOAlK7yESJozAzchixY6g.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 46992, 'original_width' => 768, 'original_height' => 300],
|
||||
['filename' => 'capability-overview_of_services.webp', 'path' => 'cms/media/originals/Vjylm0dN37CEEH53zi3ZxHWTx1TOR7KYekrnhb3z.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 34220, 'original_width' => 768, 'original_height' => 300],
|
||||
['filename' => 'case-studies.webp', 'path' => 'cms/media/originals/wf3oMRP9pRGk32vvI0p4e25F7RT9pEiX3wIs8cO8.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 44688, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'art.webp', 'path' => 'cms/media/originals/U9owB5ZZNSM8mIjexOpZbW7ypKZoRHFuC7igXOuT.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 53226, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'bridge-builder-2.webp', 'path' => 'cms/media/originals/w1cNSvzLriT6mqqwOEMhoUVI3O3UMiT34IZqVmMC.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 37212, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'bridge-builder.webp', 'path' => 'cms/media/originals/n4ZWkwGSsa73oCDFjIvVgs4kG3iEOc8BEYEXl7fW.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 33050, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'capabilities.webp', 'path' => 'cms/media/originals/5VTPNpgX3vwpzJVipg7RczfbVyU5lOXPpCTrRu66.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 41244, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'about-team.webp', 'path' => 'cms/media/originals/iBJanSjRP72c5smgMu3bKVaVIbMrXhah3nOd5B1I.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 39250, 'original_width' => 800, 'original_height' => 600],
|
||||
['filename' => 'about.webp', 'path' => 'cms/media/originals/cHKkrpxYyjeaqCUMgBuO8bVdJZQPQwLYxqKOqR4O.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 31870, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'architekt.webp', 'path' => 'cms/media/originals/AaTTxGRDVSDMzfPSkANrT2gI4PjFTltLykPnk5vQ.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 27666, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'art-of-balance.webp', 'path' => 'cms/media/originals/2x1uvwBHhHhBdJwOnqXDEig4ngb1KK1UBwjhUbdV.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 10636, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'about-1.webp', 'path' => 'cms/media/originals/pcd3MP3TQ189hurZEXhuzrCEE2uAziXRjvyMGl5r.webp', 'type' => 'image', 'mime_type' => 'image/webp', 'file_size' => 32548, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'art-of-balance.jpg', 'path' => 'cms/media/originals/0cbt8cH8mXsZ7i5juu45WYZDx1QLWKAlfdrXj158.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 30205, 'original_width' => 768, 'original_height' => 512],
|
||||
['filename' => 'daniel-el-titi.jpg', 'path' => 'cms/media/originals/FKKBL4HtByeEB0VxT9vqDGdbbesWWYup23HnuCMb.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 23299, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'dogan-nergiz.jpg', 'path' => 'cms/media/originals/HHfjQ0sEFK8bD04e3v8KX6FMKHp5skAY97wAb1Gb.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 27201, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'jana-doepfner.jpg', 'path' => 'cms/media/originals/m7FqrMZonLZXyYIG2L03D7QSzA7y1JRjm9OCnfkX.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 29203, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'jessica-rath.jpg', 'path' => 'cms/media/originals/sOtVnXLtCIeBWFRvcldtHsSXb5yKLQhcwumSqunA.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 28226, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'marcus-thiemann.jpg', 'path' => 'cms/media/originals/79HmDT478Zrv2hPOKsQhRWr288QEhFVgLKY17Rou.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 33777, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'markus-kirsch.jpg', 'path' => 'cms/media/originals/TgyErbPn8rOL1Lzsjo42MXoTjFZqdP7t4xmaFAnB.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 33592, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'martina-zeidler.jpg', 'path' => 'cms/media/originals/xVkW0fKZk7Fblbd3hdj00ntC5k6clNS7zHgsyY4S.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 45997, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'peter-bernhards.jpg', 'path' => 'cms/media/originals/8MMBC2jzZzfNjJrKvSbuRTOQDdNgFxquhzecVZlK.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 25726, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'sina-roehrs.jpg', 'path' => 'cms/media/originals/ljf17PgoAMAUse4TQ1FFE6IT6twBU93r2SpC4Ngm.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 44266, 'original_width' => 400, 'original_height' => 400],
|
||||
['filename' => 'post-1.jpeg', 'path' => 'cms/media/originals/5J1FlboQGfQ43gcnTPIBuntrXMkLMCtpIDRoLkro.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 76671, 'original_width' => 800, 'original_height' => 417],
|
||||
['filename' => 'post-2.jpeg', 'path' => 'cms/media/originals/bwlf6A9hTehxMIUqSlUA8274SCaN9PtpKXKhkMYL.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 68640, 'original_width' => 800, 'original_height' => 417],
|
||||
['filename' => 'post-3.jpeg', 'path' => 'cms/media/originals/1tWXALEJxq0UlNpA7ha936ubSxGXonwXTQHTLpKJ.jpg', 'type' => 'image', 'mime_type' => 'image/jpeg', 'file_size' => 67433, 'original_width' => 800, 'original_height' => 417],
|
||||
['filename' => 'inno-projekt-Capability_9011_Integrated_Consumer_Research_de.pdf', 'path' => 'cms/media/originals/BAY8u1AiIJx9uXdNqISgLGaXdLV5QiRhV3bQ2EC8.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 285318, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9011_Integrated_Consumer_Research_en.pdf', 'path' => 'cms/media/originals/iSkUqzR600Ujd0lypZFd0eKLrCqGEtN2oFnhiqOZ.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 297608, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9012_MasterData_de.pdf', 'path' => 'cms/media/originals/rhh7d9qWvOnLalBFC7g1ANYJXUBjjB1ZNfFY0yns.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 454633, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9012_MasterData_en.pdf', 'path' => 'cms/media/originals/t9PpREeNXZU8xWVzZLXeqmdunq9JiZGUYNzmY2BX.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 451953, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9101_GlobalPlayer_de.pdf', 'path' => 'cms/media/originals/fpFymdm8FwXT0v3XjJY6wks9qGlIBHeWWW8zcypF.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 358498, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9101_GlobalPlayer_en.pdf', 'path' => 'cms/media/originals/ZKwcEebti4yjCNMOfZVimblesZgfncoN8db8lSaO.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 369039, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9102_NationalChampions_en.pdf', 'path' => 'cms/media/originals/flcDISWYm41Cc8mTPs1ERKsmEY2pK1gnLLATOynv.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 466950, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9102_NationaleChampions_de.pdf', 'path' => 'cms/media/originals/UiJ4HznbKtc5QNjZoHfxD8e8fpp2zXP6Ehh17Q5g.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 470648, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9202_Leistungsuebersicht_de.pdf', 'path' => 'cms/media/originals/K1mwmLVYmQGhaxLrgeyBPPOQwBUTjKh1gCR1hbn5.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 213462, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Capability_9202_Service_Overview_en.pdf', 'path' => 'cms/media/originals/ABM3X7BRMMpViLKBc9PbpPyi1lFFQBhviIRa53Fp.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 206054, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Case_Study_7010_MasterDataExcellence_de.pdf', 'path' => 'cms/media/originals/ebvunH8d8qhEMamnpmA3Myvck6nOnOXzCdsC4XCr.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 437216, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Case_Study_7010_MasterDataExcellence_en.pdf', 'path' => 'cms/media/originals/whR8GmCPX6qCbMoA8T99G7LEkm2oL2Z3YEG8vYg5.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 415218, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Case_Study_7011_HairCareRD_ProductSupport_de.pdf', 'path' => 'cms/media/originals/zf1xUGsjiCG7SI4Ci2QiXkojwcwjmsAmqObXCX0W.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 361192, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Case_Study_7011_HairCareRD_ProductSupport_en.pdf', 'path' => 'cms/media/originals/6cr2yF2CekUyEcTz0TzNNcd2fsEEvThutJjHHmpy.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 376542, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Case_Study_7012_LabSupport_DataIntegration_de.pdf', 'path' => 'cms/media/originals/bRu1mHHsUEcv0gLSkoZQPZcUf9Ixr2Y2tbML8K5o.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 402710, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Case_Study_7012_LabSupport_DataIntegration_en.pdf', 'path' => 'cms/media/originals/cB8h1DybKR5gjG4BNfkw4xQAa4K7DSi16sck8XCG.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 380668, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Case_Study_7013_FragrancePump_Experience_de.pdf', 'path' => 'cms/media/originals/5yNbrbMGGm6jIC72SNPv6JHHTKWRy0Rf22MyPL0m.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 386255, 'original_width' => null, 'original_height' => null],
|
||||
['filename' => 'inno-projekt-Case_Study_7013_FragrancePump_Experience_en.pdf', 'path' => 'cms/media/originals/wVjrJVHWhY1SwYvYuDhLeFjL00UMPUQ4UeyaISvr.pdf', 'type' => 'pdf', 'mime_type' => 'application/pdf', 'file_size' => 397411, 'original_width' => null, 'original_height' => null],
|
||||
];
|
||||
|
||||
$service = app(MediaConversionService::class);
|
||||
|
||||
foreach ($mediaItems as $item) {
|
||||
$media = CmsMedia::updateOrCreate(
|
||||
['filename' => $item['filename']],
|
||||
[
|
||||
'path' => $item['path'],
|
||||
'type' => $item['type'],
|
||||
'mime_type' => $item['mime_type'],
|
||||
'file_size' => $item['file_size'],
|
||||
'original_width' => $item['original_width'],
|
||||
'original_height' => $item['original_height'],
|
||||
'disk' => 'public',
|
||||
'is_published' => true,
|
||||
]
|
||||
);
|
||||
|
||||
if (
|
||||
$item['type'] === 'image'
|
||||
&& Storage::disk('public')->exists($item['path'])
|
||||
) {
|
||||
$service->generateThumbnail($media);
|
||||
}
|
||||
}
|
||||
|
||||
$imageEntries = [
|
||||
['group' => 'welcome', 'key' => 'hero.image', 'value' => 'keyvisual-small.webp'],
|
||||
['group' => 'art-of-balance', 'key' => 'hero.image', 'value' => 'keyvisual-small.webp'],
|
||||
['group' => 'art-of-balance', 'key' => 'integration_image', 'value' => 'integration-process.webp'],
|
||||
['group' => 'kontakt', 'key' => 'hero.image', 'value' => 'kontakt.webp'],
|
||||
['group' => 'faq_page', 'key' => 'hero.image', 'value' => 'kontakt.webp'],
|
||||
['group' => 'case-studies', 'key' => 'hero.image', 'value' => 'case-studies.webp'],
|
||||
['group' => 'capabilities', 'key' => 'hero.image', 'value' => 'capabilities.webp'],
|
||||
['group' => 'nationale-champions', 'key' => 'hero.image', 'value' => 'nationale-champions.webp'],
|
||||
['group' => 'global-player', 'key' => 'hero.image', 'value' => 'global-player.webp'],
|
||||
['group' => 'leistungen', 'key' => 'hero.image', 'value' => 'leistungen.webp'],
|
||||
['group' => 'leistungen', 'key' => 'feature_image', 'value' => 'leistung-1.webp'],
|
||||
['group' => 'karriere', 'key' => 'hero.image', 'value' => 'karriere.webp'],
|
||||
['group' => 'about', 'key' => 'hero.image', 'value' => 'about-1.webp'],
|
||||
['group' => 'team', 'key' => 'hero.image', 'value' => 'team.webp'],
|
||||
['group' => 'about', 'key' => 'preview_image', 'value' => 'about-team.webp'],
|
||||
['group' => 'digitale-transformation', 'key' => 'hero.image', 'value' => 'leistung-5.webp'],
|
||||
['group' => 'master-data', 'key' => 'hero.image', 'value' => 'leistung-2.webp'],
|
||||
['group' => 'nachhaltige-verpackungen', 'key' => 'hero.image', 'value' => 'leistung-3.webp'],
|
||||
['group' => 'prozess-optimierung', 'key' => 'hero.image', 'value' => 'leistung-4.webp'],
|
||||
['group' => 'strategische-projektumsetzung', 'key' => 'hero.image', 'value' => 'leistung-1.webp'],
|
||||
];
|
||||
|
||||
foreach ($imageEntries as $entry) {
|
||||
$content = CmsContent::updateOrCreate(
|
||||
['group' => $entry['group'], 'key' => $entry['key']],
|
||||
['type' => 'image']
|
||||
);
|
||||
$content->setTranslation('value', 'de', $entry['value']);
|
||||
$content->setTranslation('value', 'en', $entry['value']);
|
||||
$content->save();
|
||||
}
|
||||
|
||||
app(\FluxCms\Core\Services\CmsContentService::class)->clearCache();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use FluxCms\Core\Models\CmsNewsItem;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CmsNewsItemSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private array $imageMapping = [
|
||||
'/assets/images/capability-overview_of_services.jpg' => 'capability-overview_of_services.webp',
|
||||
'/assets/images/capability-global-player.jpg' => 'capability-global-player.webp',
|
||||
'/assets/images/capability-national-champions.jpg' => 'capability-national-champions.webp',
|
||||
'/assets/images/story-taob.jpg?v1' => 'story-taob.webp',
|
||||
'/assets/images/story-taob.jpg' => 'story-taob.webp',
|
||||
'/assets/images/story-logo.jpg' => 'story-logo.webp',
|
||||
'/assets/images/leistung-4.jpg' => 'leistung-4.webp',
|
||||
'/assets/images/leistung-2.jpg' => 'leistung-2.webp',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private array $pdfMapping = [
|
||||
'pdfs/inno-projekt-Capability_9202_Leistungsuebersicht_de.pdf' => 'inno-projekt-Capability_9202_Leistungsuebersicht_de.pdf',
|
||||
'pdfs/inno-projekt-Capability_9101_GlobalPlayer_de.pdf' => 'inno-projekt-Capability_9101_GlobalPlayer_de.pdf',
|
||||
'pdfs/inno-projekt-Capability_9102_NationaleChampions_de.pdf' => 'inno-projekt-Capability_9102_NationaleChampions_de.pdf',
|
||||
];
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
$locales = ['de', 'en'];
|
||||
$itemsByLocale = [];
|
||||
|
||||
foreach ($locales as $locale) {
|
||||
$path = lang_path("{$locale}/components.php");
|
||||
if (file_exists($path)) {
|
||||
$data = require $path;
|
||||
$itemsByLocale[$locale] = $data['news_band']['items'] ?? [];
|
||||
}
|
||||
}
|
||||
|
||||
$deItems = $itemsByLocale['de'] ?? [];
|
||||
$enItems = $itemsByLocale['en'] ?? [];
|
||||
|
||||
$maxCount = max(count($deItems), count($enItems));
|
||||
|
||||
for ($i = 0; $i < $maxCount; $i++) {
|
||||
$de = $deItems[$i] ?? [];
|
||||
$en = $enItems[$i] ?? [];
|
||||
|
||||
$rawImage = $de['image'] ?? $en['image'] ?? null;
|
||||
$rawPdf = $de['pdf_path'] ?? $en['pdf_path'] ?? null;
|
||||
|
||||
CmsNewsItem::updateOrCreate(
|
||||
['order' => $i],
|
||||
[
|
||||
'icon' => $de['icon'] ?? $en['icon'] ?? null,
|
||||
'text' => array_filter(['de' => $de['text'] ?? null, 'en' => $en['text'] ?? null]),
|
||||
'title' => array_filter(['de' => $de['title'] ?? null, 'en' => $en['title'] ?? null]),
|
||||
'excerpt' => array_filter(['de' => $de['excerpt'] ?? null, 'en' => $en['excerpt'] ?? null]),
|
||||
'content' => array_filter(['de' => $de['content'] ?? null, 'en' => $en['content'] ?? null]),
|
||||
'image' => $this->resolveImage($rawImage),
|
||||
'date' => $de['date'] ?? $en['date'] ?? null,
|
||||
'author' => $de['author'] ?? $en['author'] ?? null,
|
||||
'link' => $de['link'] ?? $en['link'] ?? null,
|
||||
'pdf_path' => $this->resolvePdf($rawPdf),
|
||||
'pdf_open_text' => array_filter(['de' => $de['pdf_open_text'] ?? null, 'en' => $en['pdf_open_text'] ?? null]),
|
||||
'pdf_download_text' => array_filter(['de' => $de['pdf_download_text'] ?? null, 'en' => $en['pdf_download_text'] ?? null]),
|
||||
'is_published' => true,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function resolveImage(?string $path): ?string
|
||||
{
|
||||
if (! $path) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->imageMapping[$path] ?? pathinfo($path, PATHINFO_FILENAME).'.webp';
|
||||
}
|
||||
|
||||
private function resolvePdf(?string $path): ?string
|
||||
{
|
||||
if (! $path) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->pdfMapping[$path] ?? basename($path);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use FluxCms\Core\Models\CmsSearchIndex;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
class CmsSearchIndexSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$deItems = $this->loadItems('de');
|
||||
$enItems = $this->loadItems('en');
|
||||
|
||||
$deById = collect($deItems)->keyBy('id');
|
||||
$enById = collect($enItems)->keyBy('id');
|
||||
|
||||
$allIds = $deById->keys()->merge($enById->keys())->unique();
|
||||
|
||||
$order = 0;
|
||||
foreach ($allIds as $itemId) {
|
||||
$de = $deById->get($itemId, []);
|
||||
$en = $enById->get($itemId, []);
|
||||
$source = ! empty($de) ? $de : $en;
|
||||
|
||||
CmsSearchIndex::updateOrCreate(
|
||||
['item_id' => $itemId],
|
||||
[
|
||||
'route' => $source['route'] ?? '',
|
||||
'route_params' => $source['route_params'] ?? [],
|
||||
'category' => [
|
||||
'de' => $de['category'] ?? ($en['category'] ?? ''),
|
||||
'en' => $en['category'] ?? ($de['category'] ?? ''),
|
||||
],
|
||||
'title_key' => $source['title_key'] ?? null,
|
||||
'title_fallback' => [
|
||||
'de' => $de['title_fallback'] ?? null,
|
||||
'en' => $en['title_fallback'] ?? null,
|
||||
],
|
||||
'description_key' => $source['description_key'] ?? null,
|
||||
'description_fallback_key' => $source['description_fallback_key'] ?? null,
|
||||
'description_fallback_text' => [
|
||||
'de' => $de['description_fallback_text'] ?? null,
|
||||
'en' => $en['description_fallback_text'] ?? null,
|
||||
],
|
||||
'keywords' => [
|
||||
'de' => $de['keywords'] ?? [],
|
||||
'en' => $en['keywords'] ?? [],
|
||||
],
|
||||
'is_published' => true,
|
||||
'order' => $order++,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$this->command->info('CmsSearchIndexSeeder: '.$allIds->count().' Eintraege erstellt/aktualisiert.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
protected function loadItems(string $locale): array
|
||||
{
|
||||
$path = lang_path("{$locale}/search_index.php");
|
||||
if (! File::exists($path)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$config = require $path;
|
||||
|
||||
return $config['items'] ?? [];
|
||||
}
|
||||
}
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace FluxCms\Core\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use FluxCms\Core\Models\Page;
|
||||
use FluxCms\Core\Models\BlogPost;
|
||||
use FluxCms\Core\Models\Page;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CmsContentSeeder extends Seeder
|
||||
{
|
||||
|
|
@ -27,19 +27,19 @@ class CmsContentSeeder extends Seeder
|
|||
'domain_key' => 'default',
|
||||
'title' => [
|
||||
'de' => 'Willkommen auf unserer Website',
|
||||
'en' => 'Welcome to our Website'
|
||||
'en' => 'Welcome to our Website',
|
||||
],
|
||||
'slug' => [
|
||||
'de' => '/',
|
||||
'en' => '/'
|
||||
'en' => '/',
|
||||
],
|
||||
'meta_description' => [
|
||||
'de' => 'Willkommen auf unserer modernen Website, erstellt mit Flux CMS.',
|
||||
'en' => 'Welcome to our modern website, built with Flux CMS.'
|
||||
'en' => 'Welcome to our modern website, built with Flux CMS.',
|
||||
],
|
||||
'meta_keywords' => [
|
||||
'de' => 'Website, CMS, Flux CMS, Laravel',
|
||||
'en' => 'Website, CMS, Flux CMS, Laravel'
|
||||
'en' => 'Website, CMS, Flux CMS, Laravel',
|
||||
],
|
||||
'is_published' => true,
|
||||
'published_at' => now(),
|
||||
|
|
@ -50,15 +50,15 @@ class CmsContentSeeder extends Seeder
|
|||
'domain_key' => 'default',
|
||||
'title' => [
|
||||
'de' => 'Über uns',
|
||||
'en' => 'About us'
|
||||
'en' => 'About us',
|
||||
],
|
||||
'slug' => [
|
||||
'de' => '/ueber-uns',
|
||||
'en' => '/about'
|
||||
'en' => '/about',
|
||||
],
|
||||
'meta_description' => [
|
||||
'de' => 'Erfahren Sie mehr über unser Unternehmen und unsere Mission.',
|
||||
'en' => 'Learn more about our company and our mission.'
|
||||
'en' => 'Learn more about our company and our mission.',
|
||||
],
|
||||
'is_published' => true,
|
||||
'published_at' => now(),
|
||||
|
|
@ -69,15 +69,15 @@ class CmsContentSeeder extends Seeder
|
|||
'domain_key' => 'default',
|
||||
'title' => [
|
||||
'de' => 'Kontakt',
|
||||
'en' => 'Contact'
|
||||
'en' => 'Contact',
|
||||
],
|
||||
'slug' => [
|
||||
'de' => '/kontakt',
|
||||
'en' => '/contact'
|
||||
'en' => '/contact',
|
||||
],
|
||||
'meta_description' => [
|
||||
'de' => 'Kontaktieren Sie uns für weitere Informationen.',
|
||||
'en' => 'Contact us for more information.'
|
||||
'en' => 'Contact us for more information.',
|
||||
],
|
||||
'is_published' => true,
|
||||
'published_at' => now(),
|
||||
|
|
@ -95,19 +95,19 @@ class CmsContentSeeder extends Seeder
|
|||
[
|
||||
'title' => [
|
||||
'de' => 'Willkommen bei Flux CMS',
|
||||
'en' => 'Welcome to Flux CMS'
|
||||
'en' => 'Welcome to Flux CMS',
|
||||
],
|
||||
'slug' => [
|
||||
'de' => 'willkommen-bei-flux-cms',
|
||||
'en' => 'welcome-to-flux-cms'
|
||||
'en' => 'welcome-to-flux-cms',
|
||||
],
|
||||
'excerpt' => [
|
||||
'de' => 'Flux CMS ist ein modernes, komponentenbasiertes Content Management System für Laravel.',
|
||||
'en' => 'Flux CMS is a modern, component-based Content Management System for Laravel.'
|
||||
'en' => 'Flux CMS is a modern, component-based Content Management System for Laravel.',
|
||||
],
|
||||
'content' => [
|
||||
'de' => '<p>Flux CMS revolutioniert die Art, wie Sie Inhalte verwalten. Mit seiner einzigartigen "Code-as-Schema" Philosophie definieren Sie Inhaltsstrukturen direkt in PHP-Komponenten.</p><p>Dies bietet beispiellose Flexibilität und eine hervorragende Entwicklererfahrung.</p>',
|
||||
'en' => '<p>Flux CMS revolutionizes the way you manage content. With its unique "Code-as-Schema" philosophy, you define content structures directly in PHP components.</p><p>This offers unprecedented flexibility and an excellent developer experience.</p>'
|
||||
'en' => '<p>Flux CMS revolutionizes the way you manage content. With its unique "Code-as-Schema" philosophy, you define content structures directly in PHP components.</p><p>This offers unprecedented flexibility and an excellent developer experience.</p>',
|
||||
],
|
||||
'category' => 'News',
|
||||
'tags' => ['CMS', 'Laravel', 'Flux'],
|
||||
|
|
@ -118,19 +118,19 @@ class CmsContentSeeder extends Seeder
|
|||
[
|
||||
'title' => [
|
||||
'de' => 'Multi-Domain Support',
|
||||
'en' => 'Multi-Domain Support'
|
||||
'en' => 'Multi-Domain Support',
|
||||
],
|
||||
'slug' => [
|
||||
'de' => 'multi-domain-support',
|
||||
'en' => 'multi-domain-support'
|
||||
'en' => 'multi-domain-support',
|
||||
],
|
||||
'excerpt' => [
|
||||
'de' => 'Verwalten Sie mehrere Websites von einer Installation aus.',
|
||||
'en' => 'Manage multiple websites from one installation.'
|
||||
'en' => 'Manage multiple websites from one installation.',
|
||||
],
|
||||
'content' => [
|
||||
'de' => '<p>Mit Flux CMS können Sie mehrere Domains von einer einzigen Installation aus verwalten. Jede Domain kann ihre eigenen Inhalte, Designs und Einstellungen haben.</p>',
|
||||
'en' => '<p>With Flux CMS, you can manage multiple domains from a single installation. Each domain can have its own content, designs, and settings.</p>'
|
||||
'en' => '<p>With Flux CMS, you can manage multiple domains from a single installation. Each domain can have its own content, designs, and settings.</p>',
|
||||
],
|
||||
'category' => 'Features',
|
||||
'tags' => ['Multi-Domain', 'Features'],
|
||||
|
|
@ -141,19 +141,19 @@ class CmsContentSeeder extends Seeder
|
|||
[
|
||||
'title' => [
|
||||
'de' => 'Komponenten-First Architektur',
|
||||
'en' => 'Component-First Architecture'
|
||||
'en' => 'Component-First Architecture',
|
||||
],
|
||||
'slug' => [
|
||||
'de' => 'komponenten-first-architektur',
|
||||
'en' => 'component-first-architecture'
|
||||
'en' => 'component-first-architecture',
|
||||
],
|
||||
'excerpt' => [
|
||||
'de' => 'Bauen Sie Seiten aus wiederverwendbaren Livewire-Komponenten.',
|
||||
'en' => 'Build pages from reusable Livewire components.'
|
||||
'en' => 'Build pages from reusable Livewire components.',
|
||||
],
|
||||
'content' => [
|
||||
'de' => '<p>Die Komponenten-First Architektur von Flux CMS ermöglicht es Ihnen, komplexe Seiten aus kleinen, wiederverwendbaren Komponenten zu erstellen.</p><p>Jede Komponente kann ihre eigenen Felder und Validierungsregeln definieren.</p>',
|
||||
'en' => '<p>The component-first architecture of Flux CMS allows you to create complex pages from small, reusable components.</p><p>Each component can define its own fields and validation rules.</p>'
|
||||
'en' => '<p>The component-first architecture of Flux CMS allows you to create complex pages from small, reusable components.</p><p>Each component can define its own fields and validation rules.</p>',
|
||||
],
|
||||
'category' => 'Architecture',
|
||||
'tags' => ['Components', 'Livewire', 'Architecture'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue