netgescon-day0/scratch/check_columns.php

16 lines
444 B
PHP

<?php
require __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();
use Illuminate\Support\Facades\Schema;
$table = 'dettaglio_importi_tabella';
if (Schema::hasTable($table)) {
echo "Columns for '$table':\n";
print_r(Schema::getColumnListing($table));
} else {
echo "Table '$table' does not exist.\n";
}