aboutsummaryrefslogtreecommitdiff
path: root/routes/web.php
blob: 80c1b9be549224cf1315817ef1b504394ed5b017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php

use App\Http\Controllers\AdminBookmarksController;
use App\Http\Controllers\AdminGuestbookController;
use App\Http\Controllers\AdminImportController;
use App\Http\Controllers\BookmarksController;
use App\Http\Controllers\CalculatorsController;
use App\Http\Controllers\ComputersController;
use App\Http\Controllers\GuestbookController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\MusicController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

// Run the PageView middleware for *all* public GET routes
Route::get('/', [HomeController::class, 'show']);
Route::get('/bookmarks', [BookmarksController::class, 'show']);
Route::get('/guestbook', [GuestbookController::class, 'show']);
Route::get('/calculators', [CalculatorsController::class, 'show']);
Route::get('/computers', [ComputersController::class, 'show']);
Route::get('/music', [MusicController::class, 'show']);
Route::post('/guestbook', [GuestbookController::class, 'addEntry'])
    ->middleware('rate_limit');

// Admin pages
Route::prefix('admin')->group(function () {
    Route::get('/admin/guestbook', [AdminGuestbookController::class, 'show']);
    Route::get('/admin/bookmarks', [AdminBookmarksController::class, 'show']);
    Route::get('/admin/import', [AdminImportController::class, 'show']);
    Route::post('/admin/import', [AdminImportController::class, 'submit'])
        ->name('admin.import.submit');

})->middleware('auth');