2026-01-14 21:46:04 +02:00
|
|
|
<?php
|
|
|
|
|
|
2026-01-17 13:46:20 +02:00
|
|
|
use App\Http\Controllers\AlertController;
|
|
|
|
|
use App\Http\Controllers\DashboardController;
|
|
|
|
|
use App\Http\Controllers\SettingsController;
|
|
|
|
|
use App\Http\Controllers\SiteController;
|
2026-01-14 21:46:04 +02:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
|
|
Route::get('/', function () {
|
2026-01-17 13:46:20 +02:00
|
|
|
return view('welcome-landing');
|
|
|
|
|
})->name('home');
|
|
|
|
|
|
|
|
|
|
Auth::routes();
|
|
|
|
|
|
|
|
|
|
// Override the default /home route from Auth scaffolding
|
|
|
|
|
Route::get('/home', function () {
|
|
|
|
|
return redirect()->route('dashboard');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Route::middleware('auth')->group(function () {
|
|
|
|
|
Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard');
|
|
|
|
|
Route::resource('sites', SiteController::class);
|
|
|
|
|
Route::get('dashboard/{site}', [DashboardController::class, 'show'])->name('dashboard.show');
|
|
|
|
|
|
|
|
|
|
// Alerts
|
|
|
|
|
Route::get('/alerts', [AlertController::class, 'index'])->name('alerts.index');
|
|
|
|
|
Route::patch('/alerts/{notification}/read', [AlertController::class, 'markAsRead'])->name('alerts.markAsRead');
|
|
|
|
|
Route::patch('/alerts/read-all', [AlertController::class, 'markAllAsRead'])->name('alerts.markAllAsRead');
|
|
|
|
|
Route::delete('/alerts/{notification}', [AlertController::class, 'destroy'])->name('alerts.destroy');
|
|
|
|
|
Route::delete('/alerts/delete-read', [AlertController::class, 'deleteRead'])->name('alerts.deleteRead');
|
|
|
|
|
|
|
|
|
|
// Settings
|
|
|
|
|
Route::get('/settings', [SettingsController::class, 'index'])->name('settings');
|
|
|
|
|
Route::patch('/settings/notifications', [SettingsController::class, 'updateNotifications'])->name('settings.notifications');
|
|
|
|
|
Route::patch('/settings/slack', [SettingsController::class, 'updateSlack'])->name('settings.slack');
|
2026-01-14 21:46:04 +02:00
|
|
|
});
|