$result = [ 'id' => $unit->id, 'codice' => $unit->codice_unita, 'stabile' => optional($unit->stabile)->denominazione, 'millesimi' => $unit->dettagliMillesimi->map(function ($d) { return [ 'tabella' => optional($d->tabellaMillesimale)->nome_tabella_millesimale, 'codice' => optional($d->tabellaMillesimale)->codice_tabella, 'millesimi' => $d->millesimi, ]; })->values(), ]; echo json_encode($result, JSON_PRETTY_PRINT); PHP php /tmp/show_unita.php cat <<'PHP' > /tmp/show_unita.php make(\Illuminate\Contracts\Console\Kernel::class); $kernel->bootstrap(); $unit = \App\Models\UnitaImmobiliare::with(['stabile','dettagliMillesimi.tabellaMillesimale'])->first(); if (!$unit) { echo "NO_UNITA"; exit; } $result = [ 'id' => $unit->id, 'codice' => $unit->codice_unita, 'stabile' => optional($unit->stabile)->denominazione, 'millesimi' => $unit->dettagliMillesimi->map(function ($d) { $tabella = $d->tabellaMillesimale; return [ 'tabella' => optional($tabella)->denominazione ?? optional($tabella)->nome_tabella ?? optional($tabella)->nome_tabella_millesimale, 'codice' => optional($tabella)->codice_tabella ?? optional($tabella)->nome_tabella, 'millesimi' => $d->millesimi, ]; })->values(), ]; echo json_encode($result, JSON_PRETTY_PRINT); PHP php /tmp/show_unita.php rm /tmp/show_unita.php ls /home/michele/netgescon/gescon/0021/0001 ls /home/michele/netgescon cd / ls cd mnt ls cd gescon-archives/ ls cd gescon ls ls /mnt/gescon-archives/gescon ls /mnt/gescon-archives/gescon/0021 ls /mnt/gescon-archives/gescon/0021/0001 cd /mnt/gescon-archives/gescon/0021/0001 && mdb-tables singolo_anno.mdb mdb-export singolo_anno.mdb tabelle | head mdb-export singolo_anno.mdb dett_tab | head mkdir -p /home/michele/netgescon/netgescon-laravel/storage/app/legacy/0021 mdb-export singolo_anno.mdb tabelle > /home/michele/netgescon/netgescon-laravel/storage/app/legacy/0021/tabelle.csv mdb-export singolo_anno.mdb dett_tab > /home/michele/netgescon/netgescon-laravel/storage/app/legacy/0021/dett_tab.csv cd /home/michele/netgescon/netgescon-laravel && php -r 'require "vendor/autoload.php"; $app=require "bootstrap/app.php"; $kernel=$app->make(Illuminate\\Contracts\\Console\\Kernel::class); $kernel->bootstrap(); $stabile=App\\Models\\Stabile::where("denominazione","like","%Milizie%")->first(); if(!$stabile){echo "NOT_FOUND"; exit;} echo json_encode(["id"=>$stabile->id,"denominazione"=>$stabile->denominazione,"old_id"=>$stabile->old_id], JSON_PRETTY_PRINT);' cat <<'PHP' > /tmp/find_stabile.php make(\Illuminate\Contracts\Console\Kernel::class); $kernel->bootstrap(); $stabile = \App\Models\Stabile::where('denominazione', 'like', '%Milizie%')->first(); if (!$stabile) { echo "NOT_FOUND"; exit; } $result = [ 'id' => $stabile->id, 'denominazione' => $stabile->denominazione, 'old_id' => $stabile->old_id, ]; echo json_encode($result, JSON_PRETTY_PRINT); PHP php /tmp/find_stabile.php cat <<'PHP' > /tmp/list_unita.php make(\Illuminate\Contracts\Console\Kernel::class); $kernel->bootstrap(); $units = \App\Models\UnitaImmobiliare::where('stabile_id', 6) ->orderBy('id') ->get(['id','codice_unita','denominazione','interno','scala','piano','old_id','codice_interno','numero_interno']); foreach ($units as $u) { echo json_encode($u->toArray(), JSON_UNESCAPED_UNICODE) . "\n"; } PHP ls /mnt ls /mnt/gescon-archives ls /mnt/gescon-archives/gescon | head ls /mnt/gescon-archives/gescon | grep 0021 ls /mnt/gescon-archives/gescon/0021 ls /mnt/gescon-archives/gescon/0021/0001 mdb-tables /mnt/gescon-archives/gescon/0021/0001/singolo_anno.mdb | head mdb-tables /mnt/gescon-archives/gescon/0021/generale_stabile.mdb | head mdb-export /mnt/gescon-archives/gescon/0021/generale_stabile.mdb anni | head mdb-export /mnt/gescon-archives/gescon/0021/0001/singolo_anno.mdb tabelle | head mdb-export /mnt/gescon-archives/gescon/0021/0001/singolo_anno.mdb dett_tab | head mdb-export /mnt/gescon-archives/gescon/0021/0001/singolo_anno.mdb condomini_totali | head mysql -u netgescon_user -p'NetGescon2024!' -e "CREATE DATABASE IF NOT EXISTS gescon_import CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" which mdb-export && mdb-export --version 2>&1 | head -1 mdb-export -D '%Y-%m-%d' -d '|' -q '"' /mnt/gescon-archives/gescon/0021/0001/singolo_anno.mdb condomin 2>&1 | head -5 sudo cat .bash_history ls cd netgescon ls cd docs sudo nano .gitignore cd .. sudo nano .gitignore rg -n 'docs/images' .gitignore .copilotignore .chatgptignore .cursorignore **/.ignore 2>/dev/null find . -type f \( -name '.gitignore' -o -name '.copilotignore' -o -name '.chatgptignore' -o -name '.cursorignore' -o -name '.ignore' \) sed -n '1,200p' .gitignore | grep -n 'docs' sudo nano .gitignore sudo cat .gitignore sudo nano .gitignore cd netgescon-laravel sudo nano .gitignore tail -n 120 ~/.bash_history cat ~/.bash_history sudo nano .bash_history cd .. sudo nano .bash_history sudo cat .bash_history ls -l /mnt/gescon-archives/gescon/0021/0001 cd /var/www/netgescon && php artisan gescon:load-mdb --mdb=/mnt/gescon-archives/gescon/0021/0001/singolo_anno.mdb --table=condomin --stabile=0021 --truncate php artisan tinker --execute='echo json_encode(App\Models\Stabile::where("codice_stabile","0021")->orWhere("codice_interno","0021")->orWhere("denominazione","like","%MILIZIE%") ->first(["id","codice_stabile","codice_interno","denominazione","amministratore_id"]), JSON_PRETTY_PRINT);' php artisan tinker --execute='echo json_encode(App\Models\Stabile::select("id","codice_stabile","denominazione","amministratore_id")->where("codice_stabile","0021")->orWhere("denominazione","like","%MILIZIE%") ->first(), JSON_PRETTY_PRINT);' php artisan gescon:import-full --stabile=0021 --solo=unita --mdb-condomin=/mnt/gescon-archives/gescon/0021/0001/singolo_anno.mdb --split-mode=palazzine --amministratore-id=3 php artisan tinker --execute='$m=App\Models\GesconImportMapping::where("legacy_code","0021")->orderByDesc("id")->first(); if(!$m){echo "NO_MAPPING"; return;} echo json_encode([$m->id,$m->status,$m->meta], JSON_PRETTY_PRINT);' cd /home/michele/netgescon/netgescon-laravel && php artisan tinker --execute="DB::table('stabili')->where('codice_stabile', '0021')->first();" php artisan tinker --execute="echo DB::table('stabili')->where('codice_stabile', '0021')->exists() ? 'yes' : 'no';" php artisan tinker --execute="echo DB::table('unita_immobiliari')->where('stabile_id', 6)->count();" php artisan tinker --execute="dd(DB::connection('gescon_import')->table('condomin')->select('cod_stabile')->distinct()->limit(10)->get());" php artisan tinker --execute="echo Schema::hasColumn('unita_immobiliari', 'codice_unita') ? 'yes' : 'no';" php artisan tinker --execute="echo DB::table('unita_immobiliari')->where('codice_unita', 'like', '0021-%')->count();" php artisan tinker --execute="dd(DB::table('unita_immobiliari')->where('codice_unita', 'like', '0021-%')->limit(1)->first());" php artisan tinker --execute="dd(DB::table('stabili')->where('id', 25)->first());" php artisan tinker --execute="dd(DB::table('gescon_import_mappings')->where('id', 13)->first());" php artisan tinker --execute="dd(DB::table('stabili')->where('id', 6)->first());" php artisan gescon:import-full --solo=unita --stabile=0021 --target-stabile-id=6 --dry-run --limit=5 php -l app/Console/Commands/ImportGesconFullPipeline.php php -l app/Http/Controllers/Admin/GesconImportController.php php -l app/Console/Commands/ImportGesconFullPipeline.php git --no-pager diff php artisan gescon:import-full --solo=unita --stabile=0021 --target-stabile-id=6 --target-stabile-code=GES00148 --dry-run --limit=5 php artisan view:cache cd /var/www/netgescon && php artisan view:cache cd /home/michele/netgescon/netgescon-laravel && vendor/bin/phpcs --standard=PSR12 app/Console/Commands/ImportGesconFullPipeline.php php -l app/Console/Commands/ImportGesconFullPipeline.php git show HEAD -- app/Console/Commands/ImportGesconFullPipeline.php | head git show HEAD -- app/Console/Commands/ImportGesconFullPipeline.php | sed -n '1,160p' sed -n '1,200p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '220,360p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '2380,2460p' app/Console/Commands/ImportGesconFullPipeline.php git checkout -- app/Console/Commands/ImportGesconFullPipeline.php sed -n '1,40p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '40,120p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '3300,3460p' app/Console/Commands/ImportGesconFullPipeline.php wc -l app/Console/Commands/ImportGesconFullPipeline.php grep -n "loadMappingIfAny" -n app/Console/Commands/ImportGesconFullPipeline.php sed -n '2777,2840p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '2281,2325p' app/Console/Commands/ImportGesconFullPipeline.php php -l app/Console/Commands/ImportGesconFullPipeline.php sed -n '1,30p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '30,120p' app/Console/Commands/ImportGesconFullPipeline.php wc -l app/Console/Commands/ImportGesconFullPipeline.php sed -n '1,200p' app/Services/GesconImport/Steps/HandlesUnitaStep.php cd /var/www/netgescon && sed -n '1,40p' app/Console/Commands/ImportGesconFullPipeline.php cd /home/michele/netgescon/netgescon-laravel && sed -n '1,200p' app/Services/GesconImport/Steps/HandlesSoggettiStep.php grep -n "targetStabile" -n app/Console/Commands/ImportGesconFullPipeline.php sed -n '1920,2005p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "target-stabile" app/Console/Commands/ImportGesconFullPipeline.php grep -n "mappingMeta" app/Console/Commands/ImportGesconFullPipeline.php sed -n '2440,2525p' app/Console/Commands/ImportGesconFullPipeline.php cd /var/www/netgescon && sed -n '40,200p' app/Console/Commands/ImportGesconFullPipeline.php cd /home/michele/netgescon/netgescon-laravel && sed -n '200,400p' app/Services/GesconImport/Steps/HandlesUnitaStep.php cd /var/www/netgescon && grep -n "mappingMeta" app/Console/Commands/ImportGesconFullPipeline.php cd /home/michele/netgescon/netgescon-laravel && grep -n "namespace App\\Console\\Commands" -n app/Console/Commands/ImportGesconFullPipeline.php git show HEAD~1:app/Console/Commands/ImportGesconFullPipeline.php | sed -n '1,40p' git status -sb git show HEAD:app/Console/Commands/ImportGesconFullPipeline.php | sed -n '1,40p' git checkout HEAD -- app/Console/Commands/ImportGesconFullPipeline.php sed -n '1,40p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "stabileId" app/Console/Commands/ImportGesconFullPipeline.php sed -n '2060,2105p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "stabileLegacyRow" app/Console/Commands/ImportGesconFullPipeline.php grep -n "stabileLookupColumn" app/Console/Commands/ImportGesconFullPipeline.php grep -n "ensureStabilePerScala" app/Console/Commands/ImportGesconFullPipeline.php grep -n "resolveTargetStabile" app/Console/Commands/ImportGesconFullPipeline.php sed -n '2105,2235p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '2600,2740p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '2740,2880p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '2880,3040p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "function resolveStabileId" -n app/Console/Commands/ImportGesconFullPipeline.php sed -n '2281,2360p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '70,160p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '88,150p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '90,170p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '60,120p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '120,220p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "public function handle" app/Console/Commands/ImportGesconFullPipeline.php sed -n '1,120p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '1,200p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "private function stepUnita" app/Console/Commands/ImportGesconFullPipeline.php sed -n '531,870p' app/Console/Commands/ImportGesconFullPipeline.php python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); start=text.index(' private function stepUnita'); end=text.index(' private function stepSoggetti'); p.write_text(text[:start] + text[end:])" python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); start=text.index(' private function stepSoggetti'); end=text.index(' private function stepDiritti'); p.write_text(text[:start] + text[end:])" python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); start=text.index(' private function stepDiritti'); end=text.index(' private function stepMillesimi'); p.write_text(text[:start] + text[end:])" php -l app/Console/Commands/ImportGesconFullPipeline.php sed -n '240,280p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '200,260p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '160,220p' app/Console/Commands/ImportGesconFullPipeline.php php -l app/Console/Commands/ImportGesconFullPipeline.php sed -n '220,280p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '248,268p' app/Console/Commands/ImportGesconFullPipeline.php python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); junk='\n\n $optCode = $this->option(\'target-stabile-code\');\n if ($optCode) {\n $row = $this->findStabileRowByCode((string)$optCode);\n if ($row) {\n return (int)$row->id;\n }\n }\n\n'; text=text.replace(junk, '\n\n', 1); p.write_text(text)" php -l app/Console/Commands/ImportGesconFullPipeline.php grep -n "\$optCode" app/Console/Commands/ImportGesconFullPipeline.php sed -n '200,240p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '140,200p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "resolveTargetStabileId" app/Console/Commands/ImportGesconFullPipeline.php sed -n '2000,2070p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "private function stabileLookupColumn" app/Console/Commands/ImportGesconFullPipeline.php sed -n '1980,2070p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '2070,2140p' app/Console/Commands/ImportGesconFullPipeline.php python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); marker=' private function stabileLookupColumn()'; first=text.index(marker); start=text.index(marker, first + 1); end=text.index(' private function stepStabili', start); p.write_text(text[:start] + text[end:])" sed -n '2140,2200p' app/Console/Commands/ImportGesconFullPipeline.php python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); marker=' private function stabileLookupColumn()'; first=text.index(marker); start=text.index(marker, first + 1); end=text.index(' private function generateCode', start); p.write_text(text[:start] + text[end:])" grep -n "private function stabileLookupColumn" app/Console/Commands/ImportGesconFullPipeline.php grep -n "private function resolveTargetStabileId" app/Console/Commands/ImportGesconFullPipeline.php sed -n '120,200p' app/Console/Commands/ImportGesconFullPipeline.php grep -n "private function resolveTargetStabileId" app/Console/Commands/ImportGesconFullPipeline.php php -l app/Console/Commands/ImportGesconFullPipeline.php grep -n "\$optCode" app/Console/Commands/ImportGesconFullPipeline.php sed -n '320,360p' app/Console/Commands/ImportGesconFullPipeline.php python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); junk='\n\n $optCode = $this->option(\'target-stabile-code\');\n if ($optCode) {\n $row = $this->findStabileRowByCode((string)$optCode);\n if ($row) {\n return (int)$row->id;\n }\n }\n\n if ($this->mappingRow && isset($this->mappingRow->stabile_id) && $this->mappingRow->stabile_id) {\n $candidate = (int)$this->mappingRow->stabile_id;\n if ($candidate > 0 && DB::table(\'stabili\')->where(\'id\', $candidate)->exists()) {\n return $candidate;\n }\n }\n'; text=text.replace(junk, '\n\n', 1); p.write_text(text)" php -l app/Console/Commands/ImportGesconFullPipeline.php grep -n "\$optCode" app/Console/Commands/ImportGesconFullPipeline.php sed -n '332,352p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '352,372p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '372,392p' app/Console/Commands/ImportGesconFullPipeline.php python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); start=text.index('\n\n $optCode = $this->option(\'target-stabile-code\');'); end=text.index(' private function resolveTargetStabileCode', start); p.write_text(text[:start] + text[end:])" grep -n "private function resolveTargetStabileCode" app/Console/Commands/ImportGesconFullPipeline.php sed -n '280,420p' app/Console/Commands/ImportGesconFullPipeline.php python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); closing=' return DB::table(\'stabili\')->insertGetId($data);\n }\n\n'; start=text.index(closing) + len(closing); end=text.index(' private function stepStabili', start); p.write_text(text[:start] + text[end:])" python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); marker="return DB::table('stabili')->insertGetId($data);"; pos=text.index(marker); after=text.index('\n }\n', pos); start=after + len('\n }\n'); end=text.index(' private function stepStabili', start); p.write_text(text[:start] + text[end:])" python3 -c "from pathlib import Path; p=Path('app/Console/Commands/ImportGesconFullPipeline.php'); text=p.read_text(); marker='return DB::table(\'stabili\')->insertGetId($data);'; pos=text.index(marker); after=text.index('\n }\n', pos); start=after + len('\n }\n'); end=text.index(' private function stepStabili', start); p.write_text(text[:start] + text[end:])" python3 -c "from pathlib import Path; text=Path('app/Console/Commands/ImportGesconFullPipeline.php').read_text(); marker='return DB::table(\'stabili\')->insertGetId($data);'; pos=text.index(marker); print(text[pos-40:pos+80])" sed -n '200,320p' app/Console/Commands/ImportGesconFullPipeline.php sed -n '320,360p' app/Console/Commands/ImportGesconFullPipeline.php python3 -c "from pathlib import Path; text=Path('app/Console/Commands/ImportGesconFullPipeline.php').read_text(); print(text.find(' private function stepStabili'))" grep -n "private function stepStabili" app/Console/Commands/ImportGesconFullPipeline.php grep -n "stepStabili" app/Console/Commands/ImportGesconFullPipeline.php sed -n '360,460p' app/Console/Commands/ImportGesconFullPipeline.php git checkout HEAD -- app/Console/Commands/ImportGesconFullPipeline.php python - <<'PY' from pathlib import Path path = Path('/home/michele/netgescon/netgescon-laravel/app/Console/Commands/ImportGesconFullPipeline.php') text = path.read_text() def remove_function(source, name): key = f"private function {name}" idx = source.find(key) if idx == -1: return source brace_idx = source.find('{', idx) if brace_idx == -1: return source depth = 0 i = brace_idx while i < len(source): ch = source[i] if ch == '{': depth += 1 elif ch == '}': depth -= 1 if depth == 0: end = i + 1 while end < len(source) and source[end] in '\n\r': end += 1 # also remove preceding newline if present to avoid double spacing start = idx while start > 0 and source[start-1] in '\n\r': start -= 1 if start == 0 or source[start-1] not in '\n\r': break return source[:start] + source[end:] i += 1 return source for fn in ['stepUnita', 'stepSoggetti', 'stepDiritti']: text = remove_function(text, fn) path.write_text(text) PY python3 - <<'PY' from pathlib import Path path = Path('/home/michele/netgescon/netgescon-laravel/app/Console/Commands/ImportGesconFullPipeline.php') text = path.read_text() def remove_function(source, name): key = f"private function {name}" idx = source.find(key) if idx == -1: return source brace_idx = source.find('{', idx) if brace_idx == -1: return source depth = 0 i = brace_idx while i < len(source): ch = source[i] if ch == '{': depth += 1 elif ch == '}': depth -= 1 if depth == 0: end = i + 1 while end < len(source) and source[end] in '\n\r': end += 1 start = idx while start > 0 and source[start-1] in '\n\r': start -= 1 if start == 0 or source[start-1] not in '\n\r': break return source[:start] + source[end:] i += 1 return source for fn in ['stepUnita', 'stepSoggetti', 'stepDiritti']: text = remove_function(text, fn) path.write_text(text) PY php -l app/Console/Commands/ImportGesconFullPipeline.php git diff --stat php -l app/Console/Commands/ImportGesconFullPipeline.php git status -sb php -r "require 'vendor/autoload.php'; /** @var \Illuminate\Foundation\Application $app */ $app = require 'bootstrap/app.php'; $app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap(); $compiler = app('blade.compiler'); echo $compiler->compileString(file_get_contents('resources/views/admin/gescon-import/tabs/unita.blade.php'));" cat <<'PHP' > /tmp/compile_blade.php make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap(); $compiler = app('blade.compiler'); $compiled = $compiler->compileString(file_get_contents(__DIR__ . '/../resources/views/admin/gescon-import/tabs/unita.blade.php')); file_put_contents('/tmp/compiled_unita.php', $compiled); PHP php /tmp/compile_blade.php php -r 'require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); $compiler = app("blade.compiler"); file_put_contents("/tmp/compiled_unita.php", $compiler->compileString(file_get_contents("resources/views/admin/gescon-import/tabs/unita.blade.php")));' sed -n '300,360p' /tmp/compiled_unita.php grep -n "gescon-import.execute" -n /tmp/compiled_unita.php sed -n '70,110p' /tmp/compiled_unita.php python3 - <<'PY' from pathlib import Path text = Path('resources/views/admin/gescon-import/tabs/unita.blade.php').read_text() line = text.splitlines()[78] # zero-based print(repr(line)) for ch in line: print(ch, ord(ch)) PY sed -n '1,80p' /tmp/compiled_unita.php php -r 'require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); $compiler = app("blade.compiler"); file_put_contents("/tmp/compiled_unita.php", $compiler->compileString(file_get_contents("resources/views/admin/gescon-import/tabs/unita.blade.php")));' sed -n '50,130p' /tmp/compiled_unita.php git diff -- resources/views/admin/gescon-import/tabs/unita.blade.php php -r 'require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); echo json_encode(\Schema::getColumnListing("unita_immobiliari"));' php -r 'require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); echo json_encode(\Schema::hasTable("unita_pertinenze") ? \Schema::getColumnListing("unita_pertinenze") : []);' php -r 'require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); echo json_encode(\Schema::getColumnListing("unita_pertinenze"));' php -r 'require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); echo implode(",", \Schema::getColumnListing("unita_pertinenze"));' php -r 'require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); var_export(\Schema::hasTable("strutture_fisiche"));' php artisan migrate php artisan migrate --path=database/migrations/2025_11_30_120000_create_unita_tipologie_table.php php artisan db:seed --class=UnitaTipologieSeeder php artisan gescon:import-full --stabile=0021 --solo=unita --dry-run --limit=50 php artisan gescon:import-full --stabile=0021 --solo=unita --dry-run git status --short git diff app/Models/UnitaImmobiliare.php sed -n '45,55p' app/Models/UnitaImmobiliare.php sed -n '125,135p' app/Models/UnitaImmobiliare.php sed -n '140,150p' app/Models/UnitaImmobiliare.php