fox/app/Http/Controllers/Fox/FoxBrainController.php

25 lines
501 B
PHP

<?php
namespace App\Http\Controllers\Fox;
use App\Services\Fox\FoxMemoryService;
use Illuminate\Http\JsonResponse;
use Illuminate\View\View;
class FoxBrainController
{
public function __construct(
private readonly FoxMemoryService $memory,
) {}
public function index(): View
{
return view('fox.brain.index', $this->memory->stats());
}
public function graph(): JsonResponse
{
return response()->json($this->memory->buildGraphPayload());
}
}