summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2023-12-31 02:04:42 +0000
committerFrankie B <git@diskfloppy.me>2023-12-31 02:04:42 +0000
commit08c8d3e06bcf3c0d6ace0f6e2f4ada568d3af22f (patch)
tree730b3ad4bd4f0d81c7d33e5fea71cf8a4784f7f6
parent27140bd257d3d8df07e570c92ad173cdcb238c49 (diff)
Disable admin routes
-rw-r--r--routes/web.php84
1 files changed, 42 insertions, 42 deletions
diff --git a/routes/web.php b/routes/web.php
index 3cddf9a..d9b39c6 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -56,46 +56,46 @@ Route::get('/bot', function () {
/* ------------------------------ Admin Routes ------------------------------ */
-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!');
-});
+//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!');
+//});