10-04-2026

This commit is contained in:
Kevin Adametz 2026-04-10 17:18:17 +02:00
parent 4d6b4930b2
commit 4bb89aad8c
836 changed files with 52961 additions and 5950 deletions

View file

@ -0,0 +1,90 @@
<?php
namespace Database\Seeders;
use App\Models\CmsArticle;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Lang;
class CmsArticleSeeder extends Seeder
{
/**
* Numerische IDs aus resources/lang/{locale}/b2in.php Slugs für cms_articles.slug
*
* @var array<int, string>
*/
private const ARTICLE_ID_TO_SLUG = [
1 => 'escrow-system-dubai-investoren',
2 => 'spotlight-al-jaddaf-hotspot',
3 => 'turnkey-investments-moeblierung-rendite',
4 => 'supply-chain-management-vertragssicherheit',
5 => 'local-for-local-regionaler-moebelhandel',
];
public function run(): void
{
foreach ($this->getArticles() as $i => $data) {
CmsArticle::query()->updateOrCreate(
['slug' => $data['slug']],
array_merge($data, ['order' => $i + 1]),
);
}
}
/**
* @return array<int, array<string, mixed>>
*/
private function getArticles(): array
{
/** @var array<int, array<string, mixed>> $articlesDe */
$articlesDe = Lang::get('b2in.articles', [], 'de');
/** @var array<int, array<string, mixed>> $articlesEn */
$articlesEn = Lang::get('b2in.articles', [], 'en');
if (! is_array($articlesDe) || $articlesDe === []) {
return [];
}
if (! is_array($articlesEn)) {
$articlesEn = [];
}
ksort($articlesDe);
$out = [];
foreach ($articlesDe as $id => $rowDe) {
$id = (int) $id;
$slug = self::ARTICLE_ID_TO_SLUG[$id] ?? null;
if ($slug === null) {
continue;
}
$rowEn = $articlesEn[$id] ?? $rowDe;
$out[] = [
'slug' => $slug,
'title' => [
'de' => (string) ($rowDe['title'] ?? ''),
'en' => (string) ($rowEn['title'] ?? ''),
],
'subtitle' => [
'de' => (string) ($rowDe['subtitle'] ?? ''),
'en' => (string) ($rowEn['subtitle'] ?? ''),
],
'image' => (string) ($rowDe['image'] ?? ''),
'category' => (string) ($rowDe['category'] ?? ''),
'date_label' => (string) ($rowDe['date'] ?? ''),
'read_time' => (string) ($rowDe['readTime'] ?? ''),
'author' => is_array($rowDe['author'] ?? null) ? $rowDe['author'] : [],
'content' => [
'de' => is_array($rowDe['content'] ?? null) ? $rowDe['content'] : [],
'en' => is_array($rowEn['content'] ?? null) ? $rowEn['content'] : [],
],
'is_published' => true,
];
}
return $out;
}
}

View file

@ -0,0 +1,118 @@
<?php
namespace Database\Seeders;
use FluxCms\Core\Models\CmsContent;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Lang;
class CmsContentSeeder extends Seeder
{
/**
* Sections to skip (not migrated, handled elsewhere or irrelevant).
*
* netzwerk_cabinet_partner / netzwerk_immobilien_hint: siehe NetzwerkPageCmsSeeder
* (nur einfügen wenn leer, damit manuelle CMS-Anpassungen nicht überschrieben werden).
*
* @var array<string>
*/
protected array $skipSections = [
'netzwerk_cabinet_partner',
'netzwerk_immobilien_hint',
];
public function run(): void
{
/** @var array<string, array{0: string, 1: string}> $sectionMap */
$sectionMap = config('cms_section_map.sections', []);
/** @var array<string, string> $langKeys */
$langKeys = config('cms_section_map.lang_keys', []);
/** @var array<string, mixed> $configTheme */
$configTheme = config('content.themes.b2in', []);
/** @var array<string, mixed> $langDe */
$langDe = Lang::get('b2in.themes.b2in', [], 'de');
/** @var array<string, mixed> $langEn */
$langEn = Lang::get('b2in.themes.b2in', [], 'en');
if (! is_array($langDe) || empty($langDe)) {
$this->command?->warn('No b2in theme found in resources/lang/de/b2in.php (key: b2in.themes.b2in) skipping.');
return;
}
if (! is_array($langEn)) {
$langEn = [];
}
/** @var array<string, mixed> $themeDe */
$themeDe = array_merge($configTheme, $langDe);
/** @var array<string, mixed> $themeEn */
$themeEn = array_merge($configTheme, $langEn);
$created = 0;
$updated = 0;
foreach ($sectionMap as $sectionKey => $groupKeyPair) {
if (in_array($sectionKey, $this->skipSections, true)) {
continue;
}
$langSectionKey = $langKeys[$sectionKey] ?? $sectionKey;
if (! array_key_exists($langSectionKey, $themeDe)) {
$this->command?->warn("Unmapped or missing theme data for section: {$sectionKey} (lang key: {$langSectionKey}) skipping.");
continue;
}
$sectionDataDe = $themeDe[$langSectionKey];
$sectionDataEn = $themeEn[$langSectionKey] ?? $sectionDataDe;
[$group, $key] = $groupKeyPair;
$type = $this->detectType($sectionDataDe);
$content = CmsContent::query()
->where('group', $group)
->where('key', $key)
->first();
$value = [
'de' => $sectionDataDe,
'en' => $sectionDataEn,
];
if ($content) {
$content->update([
'type' => $type,
'value' => $value,
]);
$updated++;
} else {
CmsContent::query()->create([
'group' => $group,
'key' => $key,
'type' => $type,
'value' => $value,
'order' => 0,
]);
$created++;
}
}
$this->command?->info("CmsContent: {$created} created, {$updated} updated.");
}
private function detectType(mixed $data): string
{
if (is_array($data)) {
return 'json';
}
if (is_string($data) && preg_match('/<[^>]+>/', $data)) {
return 'html';
}
return 'text';
}
}

View file

@ -0,0 +1,59 @@
<?php
namespace Database\Seeders;
use FluxCms\Core\Models\CmsContent;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Lang;
class CmsLegalSeeder extends Seeder
{
/**
* Rechtstexte aus resources/lang/{locale}/b2in_legal.php Gruppe „legal“.
*
* @var list<string>
*/
private const PAGE_KEYS = [
'impressum',
'privacy',
'terms',
'cookie_policy',
];
public function run(): void
{
foreach (self::PAGE_KEYS as $order => $key) {
/** @var array<string, mixed> $de */
$de = Lang::get('b2in_legal.'.$key, [], 'de');
/** @var array<string, mixed> $en */
$en = Lang::get('b2in_legal.'.$key, [], 'en');
if (! is_array($de) || $de === []) {
$this->command?->warn("CmsLegal: b2in_legal.{$key} (de) fehlt übersprungen.");
continue;
}
if (! is_array($en)) {
$en = $de;
}
CmsContent::query()->updateOrCreate(
[
'group' => 'legal',
'key' => $key,
],
[
'type' => 'json',
'value' => [
'de' => $de,
'en' => $en,
],
'order' => $order,
],
);
}
$this->command?->info('CmsLegal: '.count(self::PAGE_KEYS).' Seiten gespeichert (Gruppe legal).');
}
}

View file

@ -0,0 +1,169 @@
<?php
namespace Database\Seeders;
use App\Models\CmsProject;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Lang;
class CmsProjectSeeder extends Seeder
{
private const PROJECT_SLUG = 'azizi-creek-views-4';
/**
* Seed the CMS projects table from resources/lang/{locale}/b2in.php
* (themes.b2in.immobilien_projects.projects.{slug}).
*
* Zusätzliche Blöcke investor_trust / furniture_benefit sind in den Lang-Dateien
* nicht enthalten und werden hier mit DE/EN ergänzt.
*/
public function run(): void
{
foreach ($this->getProjects() as $data) {
CmsProject::query()->updateOrCreate(
['slug' => $data['slug']],
$data,
);
}
}
/**
* @return array<int, array<string, mixed>>
*/
private function getProjects(): array
{
$key = 'b2in.themes.b2in.immobilien_projects.projects.'.self::PROJECT_SLUG;
/** @var array<string, mixed> $de */
$de = Lang::get($key, [], 'de');
/** @var array<string, mixed> $en */
$en = Lang::get($key, [], 'en');
if ($de === [] || ! is_array($de)) {
return [];
}
if (! is_array($en)) {
$en = [];
}
$launchDate = isset($de['launch_date']) && is_string($de['launch_date'])
? Carbon::createFromFormat('d.m.Y', $de['launch_date'])
: Carbon::create(2026, 3, 3);
$extras = $this->projectTrustAndFurnitureBlocks();
return [
[
'slug' => self::PROJECT_SLUG,
'title' => [
'de' => (string) ($de['title'] ?? ''),
'en' => (string) ($en['title'] ?? $de['title'] ?? ''),
],
'location' => [
'de' => (string) ($de['location'] ?? ''),
'en' => (string) ($en['location'] ?? $de['location'] ?? ''),
],
'status' => (string) ($de['status'] ?? 'NEW LAUNCH'),
'launch_date' => $launchDate,
'price_from_aed' => 1_125_000,
'currency' => 'AED',
'image' => (string) ($de['image'] ?? ''),
'highlights' => [
'de' => is_array($de['highlights'] ?? null) ? $de['highlights'] : [],
'en' => is_array($en['highlights'] ?? null) ? $en['highlights'] : [],
],
'quick_facts' => is_array($de['quick_facts'] ?? null) ? $de['quick_facts'] : [],
'investment_case' => [
'de' => is_array($de['investment_case'] ?? null) ? $de['investment_case'] : [],
'en' => is_array($en['investment_case'] ?? null) ? $en['investment_case'] : [],
],
'gallery' => is_array($de['gallery'] ?? null) ? $de['gallery'] : [],
'location_info' => [
'de' => is_array($de['location_info'] ?? null) ? $de['location_info'] : [],
'en' => is_array($en['location_info'] ?? null) ? $en['location_info'] : [],
],
'contact' => [
'de' => is_array($de['contact'] ?? null) ? $de['contact'] : [],
'en' => is_array($en['contact'] ?? null) ? $en['contact'] : [],
],
'investor_trust' => $extras['investor_trust'],
'furniture_benefit' => $extras['furniture_benefit'],
'is_published' => true,
'order' => 0,
],
];
}
/**
* @return array{investor_trust: array<string, array<string, mixed>>, furniture_benefit: array<string, array<string, mixed>>}
*/
private function projectTrustAndFurnitureBlocks(): array
{
return [
'investor_trust' => [
'de' => [
'title' => 'Maximale Sicherheit für Ihr Investment',
'intro' => 'Der Kaufprozess in Dubai ist durch strenge staatliche Regularien international führend im Investorenschutz.',
'columns' => [
[
'icon' => 'heroicon-o-lock-closed',
'title' => 'Staatliches Escrow-System',
'text' => 'Ihre Zahlungen fließen nicht an den Bauträger, sondern auf speziell regulierte Treuhandkonten der RERA (Real Estate Regulatory Agency).',
],
[
'icon' => 'heroicon-o-building-library',
'title' => 'Strenge DLD-Kontrolle',
'text' => 'Jeder Kaufvertrag (SPA) wird offiziell beim Dubai Land Department registriert. Lückenlose behördliche Überwachung jedes Bauprojekts.',
],
[
'icon' => 'heroicon-o-chart-bar',
'title' => 'Transparente Planbarkeit',
'text' => 'Gelder werden nur streng nach zertifiziertem Baufortschritt freigegeben. Eine Zweckentfremdung Ihres Kapitals ist gesetzlich ausgeschlossen.',
],
],
'cta_url' => '/magazin/1',
'cta_label' => 'Deep Dive: Erfahren Sie im Magazin im Detail, wie das Escrow-System in Dubai Sie als Käufer schützt',
],
'en' => [
'title' => 'Maximum security for your investment',
'intro' => 'The purchase process in Dubai is among the worlds most investor-protective, thanks to strict government regulation.',
'columns' => [
[
'icon' => 'heroicon-o-lock-closed',
'title' => 'Government Escrow system',
'text' => 'Your payments do not go to the developer; they are held in specially regulated trust accounts with the RERA (Real Estate Regulatory Agency).',
],
[
'icon' => 'heroicon-o-building-library',
'title' => 'Strict DLD oversight',
'text' => 'Every purchase contract (SPA) is officially registered with the Dubai Land Department. Every construction project is monitored end-to-end.',
],
[
'icon' => 'heroicon-o-chart-bar',
'title' => 'Transparent planning',
'text' => 'Funds are released only according to certified construction progress. Misuse of your capital is legally ruled out.',
],
],
'cta_url' => '/magazin/1',
'cta_label' => 'Deep dive: read in the magazine how Dubais Escrow system protects you as a buyer',
],
],
'furniture_benefit' => [
'de' => [
'title' => 'Ihr Investment, <span class="text-secondary">Ihr Vorteil</span>',
'text' => 'Als Käufer einer B2in-Immobilie erhalten Sie exklusiven Insider-Zugang zu unserem B2in-Möbelnetzwerk. Richten Sie Ihre Immobilie zu unschlagbaren Partner-Konditionen ein.',
'button_text' => 'Mehr zum B2in-Netzwerk',
'button_link' => '/netzwerk',
],
'en' => [
'title' => 'Your investment, <span class="text-secondary">your advantage</span>',
'text' => 'As a buyer of a B2in property, you receive exclusive insider access to our B2in furniture network. Furnish your property at unbeatable partner conditions.',
'button_text' => 'Learn more about the B2in network',
'button_link' => '/netzwerk',
],
],
];
}
}

View file

@ -0,0 +1,291 @@
<?php
namespace Database\Seeders;
use App\Models\Display;
use App\Models\DisplayVersion;
use App\Models\DisplayVersionItem;
use Illuminate\Database\Seeder;
class DisplayVersionSeeder extends Seeder
{
/**
* Seed display versions, items, and displays with example data.
*/
public function run(): void
{
// ========================================
// 1. Video-Display Version
// ========================================
$videoVersion = DisplayVersion::create([
'name' => 'Schaufenster Video',
'type' => 'video-display',
'settings' => [],
'is_active' => true,
]);
$videos = [
['filename' => 'herbst_2025.mp4', 'title' => 'Herbst Kollektion 2025', 'position' => 25],
['filename' => 'fruehjahr_2025.mp4', 'title' => 'Frühjahr Kollektion 2025', 'position' => 30],
['filename' => 'herbst_2024.mp4', 'title' => 'Herbst Kollektion 2024', 'position' => 25],
['filename' => 'fruehjahr_2024.mp4', 'title' => 'Frühjahr Kollektion 2024', 'position' => 25],
];
foreach ($videos as $i => $video) {
DisplayVersionItem::create([
'display_version_id' => $videoVersion->id,
'item_type' => 'video',
'content' => $video,
'sort_order' => $i,
'is_active' => true,
]);
}
$footers = [
['headline' => 'Beratung & Termin', 'subline' => 'Jetzt Termin vereinbaren.', 'url' => 'https://b2in.de/termin'],
['headline' => 'Neue Kollektion', 'subline' => 'Entdecken Sie die aktuellen Trends.', 'url' => null],
];
foreach ($footers as $i => $footer) {
DisplayVersionItem::create([
'display_version_id' => $videoVersion->id,
'item_type' => 'footer',
'content' => $footer,
'sort_order' => $i,
'is_active' => true,
]);
}
// ========================================
// 2. B2in Version (Dark)
// ========================================
$b2inDark = DisplayVersion::create([
'name' => 'B2in Immobilien Dark',
'type' => 'b2in',
'settings' => [
'theme' => 'dark',
'footer_name' => 'Marcel Scheibe',
'footer_url' => 'b2in.de',
'transition' => ['type' => 'crossfade', 'duration_ms' => 800],
'default_image_duration' => 10,
'rotation_weights' => ['immobilien' => 70, 'moebel' => 30],
'display_active' => true,
],
'is_active' => true,
]);
$b2inItems = [
[
'category' => 'immobilien',
'media_type' => 'video',
'media_url' => '../assets/334716_medium.mp4',
'headline' => 'Internationale Immobilien — Ihr Einstieg.',
'subline' => 'Beratung, Begleitung und Vermittlung. Persönlich. Transparent.',
'duration_seconds' => 10,
],
[
'category' => 'immobilien',
'media_type' => 'video',
'media_url' => '../assets/48504-454713939_medium.mp4',
'headline' => 'Ihr Zuhause. Weltweit.',
'subline' => 'Von Dubai bis Europa wir finden Ihre Immobilie.',
'duration_seconds' => 10,
],
[
'category' => 'moebel',
'media_type' => 'image',
'media_url' => 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1920&h=1080&fit=crop',
'headline' => 'Exklusive Einrichtung — Lokal. Für Sie.',
'subline' => 'Kuratierte Möbelkonzepte von lokalen Fachhändlern.',
'duration_seconds' => 10,
],
];
foreach ($b2inItems as $i => $item) {
DisplayVersionItem::create([
'display_version_id' => $b2inDark->id,
'item_type' => 'media',
'content' => $item,
'sort_order' => $i,
'is_active' => true,
]);
}
// ========================================
// 3. B2in Version (Light)
// ========================================
$b2inLight = DisplayVersion::create([
'name' => 'B2in Immobilien Light',
'type' => 'b2in',
'settings' => [
'theme' => 'light',
'footer_name' => 'Marcel Scheibe',
'footer_url' => 'b2in.de',
'transition' => ['type' => 'crossfade', 'duration_ms' => 800],
'default_image_duration' => 10,
'rotation_weights' => ['immobilien' => 70, 'moebel' => 30],
'display_active' => true,
],
'is_active' => true,
]);
foreach ($b2inItems as $i => $item) {
DisplayVersionItem::create([
'display_version_id' => $b2inLight->id,
'item_type' => 'media',
'content' => $item,
'sort_order' => $i,
'is_active' => true,
]);
}
// ========================================
// 4. Offers Version
// ========================================
$offersVersion = DisplayVersion::create([
'name' => 'Angebote Schauraum',
'type' => 'offers',
'settings' => [
'loop' => true,
'transition' => ['type' => 'fade', 'duration' => 600],
],
'is_active' => true,
]);
$slides = [
[
'type' => 'intro',
'duration' => 8000,
'image_url' => '../assets/cabinet-intro.jpg',
'badge_text' => 'Ausstellungsdeals solange verfügbar',
'eyebrow' => 'Heute im Fokus',
'title' => "Kuratiert.\nHochwertig.\nSofort.",
'subline' => '',
'price' => '',
'original_price' => '',
'tag_text' => '',
'bullets' => [],
'disclaimer' => 'Zwischenverkauf vorbehalten',
'qr_url' => 'https://cabinet-bielefeld.de',
'qr_title' => 'Kontakt',
'contact' => "0521 98620100\nTel. oder WhatsApp",
'show_brand_text' => true,
'brand_tagline' => "Planung • Beratung\nLieferung & Montage",
],
[
'type' => 'product-hero',
'duration' => 10000,
'image_url' => '../assets/goya1.jpg',
'badge_text' => 'Einzelstück',
'eyebrow' => 'Hersteller: Sudbrock',
'title' => 'GOYA Sideboard',
'subline' => '',
'price' => '489 €',
'original_price' => 'statt 4.744 €',
'tag_text' => '',
'bullets' => [],
'disclaimer' => '',
'qr_url' => 'https://cabinet-bielefeld.de',
'qr_title' => 'Reservieren',
'contact' => "0521 98620100\nTel. oder WhatsApp",
'show_brand_text' => false,
'brand_tagline' => '',
],
[
'type' => 'product-details',
'duration' => 12000,
'image_url' => '../assets/goya2.jpg',
'badge_text' => 'Einzelstück',
'eyebrow' => 'Auf einen Blick',
'title' => 'GOYA Sideboard',
'subline' => '',
'price' => '',
'original_price' => '',
'tag_text' => '',
'bullets' => [
'Eingelagertes Einzelstück',
'Abholung in Rheda-Wiedenbrück',
'Lieferung optional',
'Deckel weiß matt (neu)',
],
'disclaimer' => '',
'qr_url' => 'https://cabinet-bielefeld.de',
'qr_title' => 'Reservieren',
'contact' => "0521 98620100\nTel. oder WhatsApp",
'show_brand_text' => false,
'brand_tagline' => '',
],
[
'type' => 'product-impulse',
'duration' => 10000,
'image_url' => '../assets/tango.jpg',
'badge_text' => 'Ausstellungsstück',
'eyebrow' => 'Nur 1×',
'title' => 'TANDO Spiegel',
'subline' => 'Heute mitnehmen',
'price' => '199 €',
'original_price' => '',
'tag_text' => 'Im Store verfügbar',
'bullets' => [],
'disclaimer' => '',
'qr_url' => 'https://cabinet-bielefeld.de',
'qr_title' => 'Sichern',
'contact' => "0521 98620100\nTel. oder WhatsApp",
'show_brand_text' => false,
'brand_tagline' => '',
],
];
foreach ($slides as $i => $slide) {
DisplayVersionItem::create([
'display_version_id' => $offersVersion->id,
'item_type' => 'slide',
'content' => $slide,
'sort_order' => $i,
'is_active' => true,
]);
}
// ========================================
// Displays
// ========================================
$display1 = Display::create([
'name' => 'Display 1 Eingang',
'location' => 'Schaufenster links',
'is_active' => true,
]);
$display1->versions()->attach([
$videoVersion->id => ['sort_order' => 0],
$b2inDark->id => ['sort_order' => 1],
]);
$display2 = Display::create([
'name' => 'Display 2 Mitte',
'location' => 'Schaufenster Mitte',
'is_active' => true,
]);
$display2->versions()->attach([
$offersVersion->id => ['sort_order' => 0],
]);
$display3 = Display::create([
'name' => 'Display 3 Rechts',
'location' => 'Schaufenster rechts',
'is_active' => true,
]);
$display3->versions()->attach([
$b2inLight->id => ['sort_order' => 0],
$offersVersion->id => ['sort_order' => 1],
$videoVersion->id => ['sort_order' => 2],
]);
$display4 = Display::create([
'name' => 'Display 4 Innen',
'location' => 'Schauraum',
'is_active' => true,
]);
$display4->versions()->attach([
$b2inDark->id => ['sort_order' => 0],
]);
}
}

View file

@ -0,0 +1,90 @@
<?php
namespace Database\Seeders;
use FluxCms\Core\Models\CmsContent;
use FluxCms\Core\Services\CmsContentService;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Lang;
class NetzwerkPageCmsSeeder extends Seeder
{
/**
* Füllt nur fehlende Netzwerk-Seitenblöcke (CABINET-Premiumpartner, Immobilien-Hinweis) aus den Lang-Dateien.
* Bestehende CMS-Einträge werden nicht überschrieben.
*
* @var array<string, array{0: string, 1: string}>
*/
protected array $sections = [
'netzwerk_cabinet_partner' => ['netzwerk', 'cabinet_partner'],
'netzwerk_immobilien_hint' => ['netzwerk', 'immobilien_hint'],
];
public function run(): void
{
/** @var array<string, mixed> $langDe */
$langDe = Lang::get('b2in.themes.b2in', [], 'de');
/** @var array<string, mixed> $langEn */
$langEn = Lang::get('b2in.themes.b2in', [], 'en');
if (! is_array($langDe)) {
$this->command?->warn('NetzwerkPageCmsSeeder: b2in.themes.b2in (de) fehlt.');
return;
}
if (! is_array($langEn)) {
$langEn = [];
}
$created = 0;
foreach ($this->sections as $sectionKey => [$group, $key]) {
if (CmsContent::query()->where('group', $group)->where('key', $key)->exists()) {
$this->command?->info("CMS {$group}.{$key} existiert bereits übersprungen.");
continue;
}
$sectionDataDe = $langDe[$sectionKey] ?? null;
if ($sectionDataDe === null) {
$this->command?->warn("Lang-Block {$sectionKey} fehlt übersprungen.");
continue;
}
$sectionDataEn = $langEn[$sectionKey] ?? $sectionDataDe;
CmsContent::query()->create([
'group' => $group,
'key' => $key,
'type' => $this->detectType($sectionDataDe),
'value' => [
'de' => $sectionDataDe,
'en' => $sectionDataEn,
],
'order' => 0,
]);
$created++;
$this->command?->info("CMS {$group}.{$key} angelegt.");
}
if ($created > 0) {
app(CmsContentService::class)->clearCache();
}
}
private function detectType(mixed $data): string
{
if (is_array($data)) {
return 'json';
}
if (is_string($data) && preg_match('/<[^>]+>/', $data)) {
return 'html';
}
return 'text';
}
}

View file

@ -139,7 +139,7 @@ class RoleSeeder extends Seeder
'manage orders', // Eigene Bestellungen
]);
// 5. Admin (B2In Management / Marcel)
// 5. Admin (B2in Management / Marcel)
$adminRole = Role::create([
'name' => 'Admin',
'display_name' => 'Admin (Administrator)',