- Created ExampleTest and RoutesTest for basic application response and route testing. - Implemented IsolatedDatabaseTestCase for isolated database testing. - Added unit tests for various models and services including Contract, CPE, and LeadDetail. - Developed request validation tests for CreateClientRequest, UpdateClientRequest, and ContractRequest. - Introduced Vite configuration for asset management in the Laravel application.
22 lines
495 B
PHP
22 lines
495 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\HomeService;
|
|
use App\Services\AnalyticalService;
|
|
use Illuminate\Http\Request;
|
|
|
|
class DashboardController extends Controller
|
|
{
|
|
public function index(HomeService $dashboard)
|
|
{
|
|
return response()->json($dashboard->index());
|
|
}
|
|
|
|
public function analytics(Request $request, AnalyticalService $analytics)
|
|
{
|
|
return response()->json($analytics->index($request));
|
|
}
|
|
}
|