@foreach($publicationTypes as $publicationType)
  • {!! $publicationType->order !!} - {!! $publicationType->name !!}
    {!! Form::open(['route' => ['publicationTypes.destroy', $publicationType->id], 'method' => 'delete']) !!}
    @shield('publicationTypes.edit')@endshield @shield('publicationTypes.delete'){!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}@endshield
    {!! Form::close() !!}

    @if($publicationType->children->count())
      @foreach ($publicationType->children()->orderBy('order')->get() as $item)
    • {!! $item->order !!} - {!! $item->name !!}
      {!! Form::open(['route' => ['publicationTypes.destroy', $item->id], 'method' => 'delete']) !!}
      @shield('publicationTypes.edit')@endshield @shield('publicationTypes.delete'){!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}@endshield
      {!! Form::close() !!}
    • @endforeach
    @endif
  • @endforeach