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

use App\Http\Controllers\Accounting\AccountingController;
use Illuminate\Support\Facades\Auth;
use App\Models\User;

Auth::login(User::first());
$controller = app(AccountingController::class);

// Use Reflection to call private method
$reflection = new ReflectionClass($controller);
$method = $reflection->getMethod('getFinancialStats');
$method->setAccessible(true);

$stats = $method->invoke($controller, 1);

echo "Dashboard Stats:\n";
print_r($stats);
