@extends('layouts.app') @section('title', 'System Diagnostics') @section('content')

System Diagnostics

System Information

Server Information
Operating System {{ PHP_OS }}
PHP Version {{ PHP_VERSION }}
Web Server {{ $_SERVER['SERVER_SOFTWARE'] ?? 'Unknown' }}
Server Time {{ date('Y-m-d H:i:s') }}
Database Information
@if($status) @endif
Database Type {{ config('database.connections.' . config('database.default') . '.driver') }}
Connection Status @try @php DB::connection()->getPdo(); $status = true; $message = 'Connected'; @endphp {{ $message }} @catch(\Exception $e) @php $status = false; $message = $e->getMessage(); @endphp Failed
{{ $message }}
@endtry
Database Version @try {{ DB::select('SELECT VERSION() as version')[0]->version }} @catch(\Exception $e) Unknown @endtry
@if(PHP_OS !== 'WINNT')
Linux-Specific Diagnostics
@php exec('df -h 2>&1', $diskOutput); @endphp
{{ implode("\n", $diskOutput) }}
@endif
Database Tables Information
@try @php $tables = DB::select('SHOW TABLES'); $tablesColumn = 'Tables_in_' . config('database.connections.' . config('database.default') . '.database'); @endphp @foreach($tables as $table) @php $tableName = $table->$tablesColumn; $count = DB::table($tableName)->count(); @endphp @endforeach @catch(\Exception $e) @endtry
Table Name Row Count Status
{{ $tableName }} {{ $count }} @try @php $status = DB::select("CHECK TABLE `$tableName`")[0]; @endphp @if($status->Msg_text == 'OK') OK @else {{ $status->Msg_text }} @endif @catch(\Exception $e) Error @endtry
Failed to retrieve table information: {{ $e->getMessage() }}
Recent Error Logs
@php $logPath = storage_path('logs/laravel-' . date('Y-m-d') . '.log'); $logContent = []; if (file_exists($logPath)) { $logContent = array_slice(file($logPath), -20); } else { $logContent[] = "No log file found for today."; } @endphp
{{ implode("", $logContent) }}
@endsection @section('scripts') @endsection