initial commit
This commit is contained in:
25
app/Http/Controllers/DashboardController.php
Normal file
25
app/Http/Controllers/DashboardController.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\DashboardService;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly DashboardService $dashboardService
|
||||
) {}
|
||||
|
||||
public function index(): View
|
||||
{
|
||||
return view('dashboard', [
|
||||
'stats' => $this->dashboardService->getStats(),
|
||||
'todayActivities' => $this->dashboardService->getTodayActivities(),
|
||||
'latestInvoices' => $this->dashboardService->getLatestInvoices(),
|
||||
'socialStats' => $this->dashboardService->getSocialStats(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user