@props([ 'project' => null, // Expects a Project model/object or an LpPage object representing a project 'canyonLink' => null, // Optional direct link to CodeCanyon ]) @if($project) @php // Determine the link for the project. // If it's an LpPage, link to its detail page. Otherwise, use canyonLink or a generic detail route. $projectDetailUrl = '#'; // Default if ($project instanceof \Modules\LandingPage\Entities\LpPage) { $projectDetailUrl = route('landingpage.page.show', $project->slug); } elseif (isset($project->slug) && Route::has('digitalvocano.projects.show')) { // Assuming a route for a dedicated Project module $projectDetailUrl = route('digitalvocano.projects.show', $project->slug); } $imageUrl = $project->featured_image_url ?? 'https://via.placeholder.com/400x300.png?text=' . urlencode($project->title ?? $project->name ?? 'Project'); $projectName = $project->name ?? $project->title ?? 'Unnamed Project'; $shortDescription = $project->short_description ?? \Illuminate\Support\Str::limit(strip_tags($project->content ?? $project->description ?? ''), 100); @endphp
merge(['class' => 'group bg-white dark:bg-gray-800 rounded-xl shadow-lg hover:shadow-2xl transition-all duration-300 ease-in-out overflow-hidden flex flex-col']) }}> Featured image for {{ $projectName }}

{{ $projectName }}

{{ $shortDescription }}

View Details @if($canyonLink || ($project->canyon_url ?? null)) Buy on CodeCanyon @endif
@endif