<?php

namespace App\Http\Controllers\V1;

use App\Actions\V1\Home\HomeStatisticsAction;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Gate;

class HomeController
{
    public function statistics(HomeStatisticsAction $action): JsonResponse
    {
        Gate::authorize('home-statistics');
        return api_response(data: $action->execute(),
            message: __('general.success_request'));
    }
}
