<?php
require 'vendor/autoload.php';
$app = require_once 'bootstrap/app.php';
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();

$products = \App\Models\Product::with('printStocks')->limit(5)->get();
foreach ($products as $p) {
    echo "\n{$p->name} ({$p->type}):\n";
    foreach ($p->printStocks as $s) {
        echo "  - {$s->name}: width={$s->width}m, cost_per_meter={$s->cost_per_meter}, cost_per_m2={$s->cost_per_m2}\n";
    }
}
