@extends('layouts.app_main') @section('content')
{{$pandp->heading}}
Date Issued:   {{ date('Y:m:d', strtotime($pandp->created_at)) }} Date Ammended:   {{ date('Y:m:d', strtotime($pandp->updated_at)) }}
Issued By:   {{$pandp->createdBy->name}} {{$pandp->createdBy->surname}} Ammended By:   {{$pandp->updatedBy->name}} {{$pandp->updatedBy->surname}}


Index Page

@if(count($previous)) @if(count($previous->children)) {{$previous->heading}} @else {{$previous->heading}} @endif

@endif @if(count($pandp->parent)) @if(count($pandp->parent->content)) {{$pandp->parent->heading}}
@else {{$pandp->parent->heading}}
@endif @else @if(count($pandp->content)) {{$pandp->heading}}
@else {{$pandp->heading}}
@endif @endif @if(count($pandp->siblings)) @foreach($pandp->siblings as $sibling) @if($sibling->id != $pandp->id) @if($sibling->id < $pandp->id) @if(count($sibling->content)) {{$sibling->heading}}
@else {{$sibling->heading}} @endif @else @if(count($sibling->content)) {{$sibling->heading}}
@else {{$sibling->heading}} @endif @endif @else {{$sibling->heading}}
@endif

@endforeach @endif @if(count($pandp->children)) @foreach($pandp->children as $sibling) @if($sibling->id != $pandp->id) @if($sibling->id < $pandp->id) @if(count($sibling->content)) {{$sibling->heading}}
@else {{$sibling->heading}} @endif @else @if(count($sibling->content)) {{$sibling->heading}}
@else {{$sibling->heading}} @endif @endif @else {{$sibling->heading}}
@endif

@endforeach @endif
@if(count($next)) @if(count($next->content)) {{$next->heading}}
@else {{$next->heading}}
@endif @endif
{!! $pandp->content->content !!}

 

@endsection