@php
$trashRedirectUrl = $crud->getOperationSetting('trashButtonRedirect');
if($trashRedirectUrl && $trashRedirectUrl instanceof \Closure){
$trashRedirectUrl = $trashRedirectUrl();
}
$trashRedirectUrl = filter_var($trashRedirectUrl, FILTER_VALIDATE_URL) ? $trashRedirectUrl : url($crud->route);
@endphp
@if ($crud->hasAccess('trash', $entry) && $entry->trashed() === false)
{{ trans('backpack/pro::trash.trash') }}
@endif
{{-- Button Javascript --}}
{{-- - used right away in AJAX operations (ex: List) --}}
{{-- - pushed to the end of the page, after jQuery is loaded, for non-AJAX operations (ex: Show) --}}
@loadOnce('trash_button_script')
@push('after_scripts') @if (request()->ajax()) @endpush @endif
@if (!request()->ajax()) @endpush @endif
@endLoadOnce