@php $files = $widget['content']; $url = Str::of(URL::current()) ->replaceLast('related-files/migration', 'related-files') ->replaceLast('related-files/model', 'related-files') ->replaceLast('related-files/seeder', 'related-files') ->replaceLast('related-files/factory', 'related-files') ->replaceLast('related-files/crud_controller', 'related-files') ->replaceLast('related-files/crud_request', 'related-files') ->replaceLast('related-files/crud_route', 'related-files') ->replaceLast('related-files/operation', 'related-files') ->replaceLast('related-files/sidebar_item', 'related-files'); @endphp
@foreach($files as $key => $file)
@if ($file) @if (is_array($file)) @foreach ($file as $item) @include('backpack.devtools::widgets.partials.unknown-file-preview', ['item' => $item]) @if (!$loop->last)
&
@endif @endforeach @else @include('backpack.devtools::widgets.partials.unknown-file-preview', ['item' => $file]) @endif @else File is missing. @endif
@endforeach
@php // ------------------------------------------------ // Get the Migration and Model (as Eloquent models) // ------------------------------------------------ if (isset($files['migration']) && !empty($files['migration'])) { $migration = \Backpack\DevTools\Models\Migration::where('file_path', $files['migration']->file_path)->first(); } else { $migration = false; } if (isset($files['model']) && !empty($files['model'])) { $model = \Backpack\DevTools\Models\Model::where('file_path', $files['model']->file_path)->first(); } else { $model = false; } if (isset($files['operation']) && !empty($files['operation'])) { $operation = \Backpack\DevTools\Models\Operation::where('file_path', $files['operation']->file_path)->first(); } else { $operation = false; } @endphp @push('after_scripts') @endpush