FranchisorDashboardController.php 493 B

12345678910111213141516171819
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Services\FranchisorDashboardService;
  4. use Illuminate\Http\JsonResponse;
  5. class FranchisorDashboardController extends Controller
  6. {
  7. public function __construct(
  8. protected FranchisorDashboardService $service,
  9. ) {}
  10. public function overview(): JsonResponse
  11. {
  12. $unitIds = array_filter((array) request()->input('unit_ids', []));
  13. return $this->successResponse(payload: $this->service->overview($unitIds));
  14. }
  15. }