@if($data) @php // need to recreate object because policy might depend on record data $class = get_class($action); $action = new $class($dataType, $data); @endphp @can ($action->getPolicy(), $data) @if ($action->shouldActionDisplayOnRow($data)) @if($action instanceof \TCG\Voyager\Actions\ViewAction and $dataType->name === 'invoices' and isset($data->id)) convertAttributesToHtml() !!}> @else convertAttributesToHtml() !!}> @endif @endif @endcan @elseif (method_exists($action, 'massAction'))
{{ csrf_field() }}
@endif