@extends('layouts.app') @section('content')
All topics
@php($partial = "help.pages.$slug")
@includeWhen(View::exists($partial), $partial, ['topics' => $topics]) @unless(View::exists($partial))
This topic hasn’t been written yet. Please check back later.
@endunless
@php $keys = array_keys($topics ?? []); $idx = array_search($slug ?? '', $keys, true); $prev = ($idx !== false && $idx > 0) ? $keys[$idx - 1] : null; $next = ($idx !== false && $idx < count($keys) - 1) ? $keys[$idx + 1] : null; @endphp
@isset($prev) {{ $topics[$prev] }} @endisset
@isset($next) {{ $topics[$next] }} @endisset
@endsection