This commit is contained in:
2026-03-20 21:17:26 +01:00
parent 1a62fcb81d
commit 29c3ff8572
229 changed files with 13147 additions and 2577 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Http\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use App\Services\NotificationService;
use Illuminate\Contracts\View\View;
use Illuminate\Http\Request;
class NotificationController extends Controller
{
public function __construct(private readonly NotificationService $notifications) {}
public function index(Request $request): View
{
$page = max(1, (int) $request->query('page', 1));
$payload = $this->notifications->listForUser($request->user(), $page, 15);
return view('dashboard.notifications', [
'notifications' => collect($payload['data'] ?? []),
'notificationsMeta' => $payload['meta'] ?? [],
'unreadCount' => (int) ($payload['unread_count'] ?? 0),
]);
}
}