@extends('website_builder.construction_theme.layout') @section('title', 'Projects & Portfolio - ' . ($agency->site_title ?? 'BuildCraft Construction')) @section('content') @php $subdomainParam = isset($subdomain) && $subdomain ? $subdomain : null; $homeUrl = $subdomainParam ? route('website-builder.subdomain.site', ['subdomain' => $subdomainParam]) : route('website-builder.templates.construction'); $aboutUrl = $subdomainParam ? route('website-builder.subdomain.about', ['subdomain' => $subdomainParam]) : route('website-builder.templates.construction.about'); $contactUrl = $subdomainParam ? route('website-builder.subdomain.contact', ['subdomain' => $subdomainParam]) : route('website-builder.templates.construction.contact'); $portfolioUrl = $subdomainParam ? route('website-builder.subdomain.portfolio', ['subdomain' => $subdomainParam]) : route('website-builder.templates.construction.portfolio'); $servicesUrl = $subdomainParam ? route('website-builder.subdomain.services', ['subdomain' => $subdomainParam]) : route('website-builder.templates.construction.services'); $agency = $agency ?? $interior ?? null; @endphp @php $defaultCnBg = asset('assets/website_builder/Templates/Construction_agency/construction_herobanner.png'); $heroImgRaw = $agency->portfolio_hero_image ?? $agency->hero_image ?? ''; $heroBannerBg = !empty($heroImgRaw) ? resolveWebsiteBuilderImage($heroImgRaw, 'assets/website_builder/Templates/Construction_agency/construction_herobanner.png') : $defaultCnBg; $portBadge = !empty($agency->portfolio_badge) ? $agency->portfolio_badge : 'OUR PROJECTS'; $portTitle = !empty($agency->portfolio_title) ? $agency->portfolio_title : "Projects Built For\nEvery Need"; $portSubtitle = !empty($agency->portfolio_subtitle) ? $agency->portfolio_subtitle : 'Discover our showcase of completed commercial, residential, industrial, and infrastructure landmark constructions.'; $portBtnText = !empty($agency->portfolio_primary_btn_text) ? $agency->portfolio_primary_btn_text : ($agency->primary_btn_text ?? 'Start Your Project'); $portBtnUrl = !empty($agency->portfolio_primary_btn_url) ? $agency->portfolio_primary_btn_url : ($agency->primary_btn_url ?? $contactUrl); @endphp
{{ $portBadge }}

{!! nl2br(e($portTitle)) !!}

{{ $portSubtitle }}

@php $items = $portfolio ?? $agency->portfolio_data ?? []; if (empty($items)) { $items = \App\Models\WebsiteBuilder\WbAgencySetting::createConstructionDefaultInstance()->portfolio_data; } $dynamicCategories = []; foreach ($items as $item) { $catStr = $item['category'] ?? ''; if (!empty($catStr)) { $cats = preg_split('/[•,]+/', $catStr); foreach ($cats as $c) { $trimmed = trim($c); if ($trimmed !== '') { $slug = \Illuminate\Support\Str::slug($trimmed); $dynamicCategories[$slug] = $trimmed; } } } } @endphp
@foreach($dynamicCategories as $slug => $catName) @endforeach
@foreach($items as $prj) @php $catStr = $prj['category'] ?? ''; $catSlugs = []; if (!empty($catStr)) { foreach (preg_split('/[•,]+/', $catStr) as $c) { $t = trim($c); if ($t !== '') $catSlugs[] = \Illuminate\Support\Str::slug($t); } } $dataCatAttr = implode(' ', $catSlugs); $prjImg = $prj['image'] ?? $prj['img'] ?? asset('assets/website_builder/Templates/Construction_agency/service_commercial.png'); $prjIcon = $prj['icon'] ?? 'fa-building'; @endphp
{{ $prj['title'] ?? '' }}

{{ $prj['title'] ?? '' }}

{{ $prj['desc'] ?? $prj['description'] ?? '' }}

@endforeach
@section('scripts') @endsection @endsection