{{-- Beispiel: Verwendung des CategoryService in einer Einzelkategorie-Seite Pfad: resources/views/web/kategorie.blade.php --}} @extends('web.layouts.web-master') @section('title', 'Kategorie - Business Portal 24') @section('content') @php use App\Services\CategoryService; // Kategorie aus Route-Parameter laden $slug = request()->segment(2); // z.B. 'wirtschaft' $category = CategoryService::getCategoryBySlug($slug); // Wenn Kategorie nicht gefunden, 404 if (!$category) { abort(404); } // Alle Kategorien für Navigation $allCategories = CategoryService::getCategories(); // Icon- und Farb-Informationen $iconPath = CategoryService::getIconPath($category['icon']); $gradient = CategoryService::getGradientForColor($category['color']); $iconColor = CategoryService::getClassForColor($category['color']); @endphp
{{ $category['name'] }}

{{ $category['name'] }}

{{ $category['description'] }}

{{ $category['count'] }} Mitteilungen
{{-- Press releases grid --}}
@foreach ($allCategories->take(4) as $cat) @if ($cat['slug'] !== $category['slug']) @php $catIconPath = CategoryService::getIconPath($cat['icon']); $catGradient = CategoryService::getGradientForColor($cat['color']); $catIconColor = CategoryService::getClassForColor($cat['color']); @endphp
{{ $cat['name'] }}

{{ $cat['name'] }}

{{ $cat['count'] }} Mitteilungen

@endif @endforeach
@endsection @push('styles') @endpush