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

$recipe = \App\Models\ProductRecipe::where('product_id', 6)->where('raw_material_id', 4)->first();
if($recipe) {
    $recipe->quantity_needed = 0.5;
    $recipe->save();
    echo "Recipe updated: Teh Kotak quantity_needed = 0.5\n";
} else {
    echo "Recipe not found\n";
}
