@props([ 'stories', 'service', 'slug' => null, 'localizedRoute', ]) @php use App\Helpers\ServiceCaseStudies; $displayStories = ServiceCaseStudies::resolve( $service, $stories ?? [], 3, $slug ?? ($service['slug'] ?? $service['id'] ?? null) ); $sliderId = 'case-studies-cards-' . preg_replace('/[^a-z0-9-]/', '', (string) ($slug ?? 'service')); @endphp @if(count($displayStories) > 0) @once @push('styles') @endpush @push('scripts') @endpush @endonce
@foreach($displayStories as $index => $story) @php $caseUrl = ! empty($story['slug']) ? $localizedRoute('portfolio.show', ['slug' => $story['slug']]) : null; $imagePath = $story['image'] ?? null; $cardStats = $story['stats'] ?? []; @endphp
@if($imagePath) {{ $story['client'] }} @else @endif
@if(! empty($story['scope']))

{{ $story['scope'] }}

@endif

{{ $story['client'] }}

@if($cardStats !== [])
    @foreach($cardStats as $stat)
  • {{ $stat['value'] }} {{ $stat['label'] }}
  • @endforeach
@endif
@if($cardStats === [] && ! empty($story['result']))

{{ $story['result'] }}

@endif @if(! empty($story['summary']))

{{ $story['summary'] }}

@endif @if($caseUrl) @endif
@endforeach
{{ __('messages.service_detail.view_all_case_studies') }}
@endif