wah.moe/routes/web.php
Frankie B 0f52d80ca6
Merge MVC rewrite into master (#21)
* Just commit it all

* Require auth

* crap

* Update homepage

* Block AI scrapers

* Update cache update script

* Add dummy file

* Remove unnecessary lastfm config var

* Use withQueryParameters for LastFM API

* Fix embeds

* Update example env

* Smard
2024-06-11 18:02:01 +01:00

45 lines
1.7 KiB
PHP

<?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!
|
*/
Route::get('/', [HomeController::class, 'show']);
Route::get('/bookmarks', [BookmarksController::class, 'show']);
Route::get('/guestbook', [GuestbookController::class, 'show']);
Route::post('/guestbook', [GuestbookController::class, 'addEntry'])
->middleware('rate_limit');
Route::get('/calculators', [CalculatorsController::class, 'show']);
Route::get('/computers', [ComputersController::class, 'show']);
Route::get('/music', [MusicController::class, 'show']);
// 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');