@extends('admin::layouts.admin') @section('title', 'Migration Details') @section('content')

Migration Details

@if(auth()->user()->checkResourcePermission($thisResourceType, $thisResourceValue, 'view')) Back to List @endif

{{ $migration->id }}

{{ $migration->formatted_name }}

{{ $migration->migration }}

{{ $migration->batch }}

@php $timestamp = preg_match('/^\d{4}_\d{2}_\d{2}_\d{6}/', $migration->migration, $matches) ? $matches[0] : null; if ($timestamp) { $datetime = \Carbon\Carbon::createFromFormat('Y_m_d_His', $timestamp); echo $datetime->format('F j, Y g:i:s A'); } else { echo 'No timestamp available'; } @endphp

@php $type = 'Unknown'; if (str_contains(strtolower($migration->migration), 'create')) { $type = 'Create Table'; } elseif (str_contains(strtolower($migration->migration), 'add')) { $type = 'Add Column'; } elseif (str_contains(strtolower($migration->migration), 'update')) { $type = 'Update Table'; } elseif (str_contains(strtolower($migration->migration), 'alter')) { $type = 'Alter Table'; } @endphp {{ $type }}

@if($previousMigration = \App\Models\Migration::where('id', '<', $migration->id)->orderBy('id', 'desc')->first()) ← Previous Migration @else
@endif @if($nextMigration = \App\Models\Migration::where('id', '>', $migration->id)->orderBy('id')->first()) Next Migration → @endif
@endsection