@forelse($projects as $index => $project)
@php
$catSlugs = $project->categories->pluck('slug')->toArray();
$dataCat = !empty($catSlugs) ? implode(' ', $catSlugs) : 'uncategorized';
$payload = [
'id' => $project->id,
'title' => $project->title,
'short' => nl2br(e($project->short_description)),
'description' => $project->description ? nl2br(e($project->description)) : '',
'location' => $project->location,
'year' => $project->year_completed,
'imageAlt' => $project->image_alt ?? $project->title,
'images' => !empty($project->image_path)
? (is_array($project->image_path)
? $project->image_path
: [$project->image_path])
: [],
'currentIdx' => 0,
'index' => $index,
];
@endphp
{{ __('No projects found.') }}