# fluent-community/trunk/app/Http/Controllers/ReportsController.php

FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS &amp; Online Courses, version trunk. 24 lines.

- Page: https://pluginprobe.com/plugins/fluent-community/trunk/code/app/Http/Controllers/ReportsController.php
- Raw: https://pluginprobe.com/plugins/fluent-community/trunk/raw/app/Http/Controllers/ReportsController.php
- Modified: 2025-02-04T16:00:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-community/trunk/code/app/Http/Controllers/ReportsController.php#L10-L20`.

```php
<?php

namespace FluentCommunity\App\Http\Controllers;

use FluentCommunity\App\Services\Analytics\AnalyticsService;
use FluentCommunity\Framework\Http\Request\Request;

class ReportsController extends Controller
{
    public function overview(Request $request)
    {

        $startDate = $request->getSafe('start_date', 'sanitize_text_field', gmdate('Y-m-d', strtotime('-30 days')));
        $endDate = $request->getSafe('end_date', 'sanitize_text_field', gmdate('Y-m-d'));

        $data = AnalyticsService::create()->getOverview($startDate, $endDate);

        return [
            'data' => $data
        ];
    }

}

```
