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"; }