dym-sh/routes/web.php

48 lines
1.0 KiB
PHP
Raw Normal View History

2024-08-06 14:12:25 +02:00
<?php
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
2024-08-06 16:39:08 +02:00
return view('index');
});
2024-08-07 15:33:25 +02:00
Route::name('about.show')->get('/about', function () {
2024-08-06 16:39:08 +02:00
return view('about');
});
2024-08-07 13:37:14 +02:00
Route::get('/graphics', function () {
return view('graphics');
});
Route::get('/photos', function () {
return view('photos');
});
Route::get('/comics', function () {
return view('comics');
});
2024-08-06 16:39:08 +02:00
Route::get('/code', function () {
return view('code');
2024-08-06 14:12:25 +02:00
});
2024-08-07 13:37:14 +02:00
Route::get('/notes', function () {
2024-08-07 15:33:25 +02:00
return view('notes');
});
Route::name('pages.list')->get('/list', function () {
return view('list');
});
Route::name('admin.new')->get('/new', function () {
return view('edit');
2024-08-07 13:37:14 +02:00
});
2024-08-07 15:33:25 +02:00
Route::name('admin.edit')->get('/edit/{slug}', function ($name) {
return view('edit');
})->where('slug', '[A-Za-z0-9-]+');
Route::name('admin.index')->get('/admin', function ($name = null) {
return view('admin');
});
Route::name('page.show')->get('/{slug}', function () {
return view('page');
})->where('slug', '[A-Za-z0-9-]+');