<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\NotificationController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::name('home.')->group(function () {
  Route::get('/', [HomeController::class, 'index'])->name('index');
  Route::put('/app/notifications/read-all', [NotificationController::class, 'readAll'])->name('notifications.read_all');
  Route::resource('/app/notifications', NotificationController::class)->only(["index", "show"]);
});

require __DIR__ . '/auth.php';
require __DIR__ . '/backoffice.php';
require __DIR__ . '/utils.php';