8 lines
915 B
PHP
8 lines
915 B
PHP
<?php
|
|
require __DIR__.'/../vendor/autoload.php';$app=require __DIR__.'/../bootstrap/app.php';$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
|
\App\Modules\Industry\IndustrialBudgets::guard();$file='C:/laragon/data/sgf-tempo/secrets/browser-fixture.json';$base=json_decode(file_get_contents($file),true,32,JSON_THROW_ON_ERROR);
|
|
if(\Illuminate\Support\Facades\DB::table('ic_lots')->exists())throw new RuntimeException('Fresh synthetic proof required; nothing deleted.');
|
|
$f=\Tests\Support\IndustrialBudgetFixture::create($base+['manager'=>\App\Models\User::findOrFail($base['manager_id']),'reader'=>\App\Models\User::findOrFail($base['reader_id'])]);
|
|
file_put_contents($file,json_encode($base+['budget_fixture'=>array_intersect_key($f,array_flip(['lot','refs','result']))],JSON_THROW_ON_ERROR));
|
|
echo "Synthetic industrial result validated at 1800; budget and comparisons remain for browser.\n";
|