diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php
index 4d9fbab15..f223dad99 100644
--- a/app/Http/Controllers/AuthController.php
+++ b/app/Http/Controllers/AuthController.php
@@ -2,14 +2,9 @@
namespace App\Http\Controllers;
-use App\Models\User;
-use Illuminate\Auth\Events\PasswordReset;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
-use Illuminate\Support\Facades\Hash;
-use Illuminate\Support\Facades\Password;
-use Illuminate\Support\Str;
use Illuminate\Validation\ValidationException;
use JetBrains\PhpStorm\ArrayShape;
diff --git a/resources/js/app.js b/resources/js/app.js
index 95a0d7413..8cf5ad355 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -9,6 +9,7 @@ import {
} from 'async-wait-until';
import $ from 'cash-dom';
import m from 'mithril';
+import redaxios from 'redaxios';
import {__} from './utils';
@@ -45,3 +46,8 @@ createInertiaApp({
import('./_material');
}
});
+
+$('#logout-button').on('click', async () => {
+ await redaxios.post(window.route('auth.logout'));
+ window.location.href = window.route('auth.login');
+});
diff --git a/resources/views/layouts/top-app-bar-menus.blade.php b/resources/views/layouts/top-app-bar-menus.blade.php
index d01dd3f3a..19dc20218 100644
--- a/resources/views/layouts/top-app-bar-menus.blade.php
+++ b/resources/views/layouts/top-app-bar-menus.blade.php
@@ -27,11 +27,8 @@
-