make('Illuminate\Contracts\Console\Kernel')->bootstrap(); use App\Services\GesconImport\LegacyArchiveService; // Manually create the service instance $service = new LegacyArchiveService(); // Call the method to get the data for stabile '0021' $data = $service->unitaYear('0021', null, 5); // Get 5 rows for preview // Output the result as JSON echo json_encode($data, JSON_PRETTY_PRINT);