@php $entry = config('tutorials.resource_explainers.'.$resourceKind); $intro = $entry ? \App\Models\Articles::publicVisible() ->where('sSlug', $entry['slug']) ->whereHas('oCategory', fn($q) => $q->where('sSlug', config('tutorials.beginner_slug'))) ->first(['id', 'sSlug']) : null; $guide = $resourceKind === 'freenode' ? \App\Models\Articles::publicVisible() ->where('sSlug', config('tutorials.guide_slug')) ->whereHas('oCategory', fn($q) => $q->where('sSlug', config('tutorials.beginner_slug'))) ->first(['id', 'sSlug']) : null; $destination = $intro ?? $guide; @endphp @if($destination) @endif