diskfloppy.me/routes/web.php

102 lines
2.7 KiB
PHP
Raw Normal View History

2023-06-13 20:59:16 +00:00
<?php
2023-12-05 00:11:58 +00:00
use Illuminate\Support\Facades\DB;
2023-06-13 20:59:16 +00:00
use Illuminate\Support\Facades\Route;
2023-12-05 00:19:48 +00:00
use Illuminate\Support\Facades\View;
2023-06-13 20:59:16 +00:00
/*
|--------------------------------------------------------------------------
| 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('/', function () {
2023-12-05 00:19:48 +00:00
return View::make('pages.home');
2023-06-13 20:59:16 +00:00
});
2023-06-13 22:50:07 +00:00
Route::get('/bookmarks', function () {
2023-12-05 00:19:48 +00:00
return View::make('pages.bookmarks');
2023-06-13 22:50:07 +00:00
});
2023-06-14 21:07:28 +00:00
Route::get('/projects', function () {
2023-12-05 00:19:48 +00:00
return View::make('pages.projects');
2023-06-14 21:07:28 +00:00
});
2023-06-14 21:08:36 +00:00
Route::get('/calculators', function () {
2023-12-05 00:19:48 +00:00
return View::make('pages.calculators');
2023-06-14 21:08:36 +00:00
});
2023-06-14 21:10:24 +00:00
Route::get('/computers', function () {
2023-12-05 00:19:48 +00:00
return View::make('pages.computers');
2023-06-14 21:10:24 +00:00
});
Route::get('/guestbook', 'App\Http\Controllers\GuestbookController@guestbook')
->name('guestbook');
Route::post('/guestbook', 'App\Http\Controllers\GuestbookController@guestbookpost')
->name('guestbookPost')
->middleware('rate_limit');
2023-07-28 22:44:17 +00:00
Route::get('/weather', function () {
2023-12-05 00:19:48 +00:00
return View::make('pages.weather');
2023-07-28 22:44:17 +00:00
});
2023-08-22 11:03:05 +00:00
Route::get('/music', function () {
2023-12-05 00:19:48 +00:00
return View::make('pages.music');
});
2023-07-29 17:16:08 +00:00
2023-08-22 11:03:05 +00:00
Route::get('/bot', function () {
2023-12-05 00:19:48 +00:00
return View::make('pages.bot');
2023-08-22 11:03:05 +00:00
});
2023-07-28 22:44:17 +00:00
/* ------------------------------ Admin Routes ------------------------------ */
2023-12-31 02:04:42 +00:00
//Route::get('/admin', function () {
// if (!auth()->check()) {
// return View::make('errors.no-auth');
// }
// return View::make('pages.admin.index');
//});
//
//Route::get('/admin/guestbook', function () {
// if (!auth()->check()) {
// return View::make('errors.no-auth');
// }
// return View::make('pages.admin.guestbook');
//});
//
//Route::get('/admin/guestbook/delete', function () {
// if (!auth()->check()) {
// return View::make('errors.no-auth');
// }
//
// $id = request()->input('id');
// $entry = DB::table('guestbook__entries')->find($id);
//
// if ($entry) {
// // Render a confirmation view
// return View::make('pages.admin.guestbook-del-confirm', compact('entry'));
// } else {
// return View::make('errors.generic-error')
// ->with('error', "Entry not found")
// ->with('description', "The specified entry does not exist!");
// }
//});
//
//Route::post('/admin/guestbook/delete', function () {
// if (!auth()->check()) {
// return View::make('errors.no-auth');
// }
//
// $id = request()->input('id');
// DB::table('guestbook__entries')->where('id', $id)->delete();
//
// return back()->with('success', 'Entry deleted successfully!');
//});