- Added standard Laravel directory structure and configuration. - Included Svelte and Tailwind configuration for the admin interface. - Added core PHPUnit and testing scripts.
25 lines
689 B
PHP
25 lines
689 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin\Analytics;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\AnalyticsService;
|
|
|
|
/**
|
|
* Controller for displaying the analytics dashboard.
|
|
*/
|
|
class AnalyticsIndexController extends Controller
|
|
{
|
|
/**
|
|
* Display the analytics dashboard.
|
|
*
|
|
* @param \App\Http\Requests\Admin\Analytics\ViewAnalyticsRequest $request
|
|
* @param \App\Services\AnalyticsService $service
|
|
* @return \Illuminate\View\View
|
|
*/
|
|
public function __invoke(\App\Http\Requests\Admin\Analytics\ViewAnalyticsRequest $request, AnalyticsService $service)
|
|
{
|
|
return view('admin.analytics.index', $service->getDashboardStats());
|
|
}
|
|
}
|