2023-06-13 20:59:16 +00:00
|
|
|
<?php
|
|
|
|
|
2024-06-11 17:02:01 +00:00
|
|
|
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;
|
2024-06-11 20:36:58 +00:00
|
|
|
use App\Http\Middleware\PageView;
|
2023-06-13 20:59:16 +00:00
|
|
|
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!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-06-11 20:36:58 +00:00
|
|
|
// Run the PageView middleware for *all* public GET routes
|
|
|
|
Route::middleware(PageView::class)->group(function () {
|
|
|
|
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']);
|
|
|
|
});
|
|
|
|
|
2024-06-11 17:02:01 +00:00
|
|
|
Route::post('/guestbook', [GuestbookController::class, 'addEntry'])
|
2023-07-16 00:49:09 +00:00
|
|
|
->middleware('rate_limit');
|
2024-06-11 17:02:01 +00:00
|
|
|
|
|
|
|
// Admin pages
|
|
|
|
Route::get('/admin/guestbook', [AdminGuestbookController::class, 'show'])
|
|
|
|
->middleware('auth');
|
|
|
|
Route::get('/admin/bookmarks', [AdminBookmarksController::class, 'show'])
|
|
|
|
->middleware('auth');
|
|
|
|
Route::get('/admin/import', [AdminImportController::class, 'show'])
|
|
|
|
->middleware('auth');
|
|
|
|
Route::post('/admin/import', [AdminImportController::class, 'submit'])
|
|
|
|
->name('admin.import.submit')
|
|
|
|
->middleware('auth');
|
2023-07-16 00:49:09 +00:00
|
|
|
|