From e6f84cd09aa265c91a59189a722e634e9e0cde79 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Sat, 4 Sep 2021 02:56:18 +0100 Subject: [PATCH] Fixed broken Laravel Mix Also disabled IP history logger for demo mode --- app/Http/Controllers/Auth/LoginController.php | 18 ++++++++++-------- webpack.mix.js | 2 ++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 0e9c9dc..a97e63c 100755 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -81,14 +81,16 @@ class LoginController extends Controller public function authenticated(Request $request, User $user) { - if ($user->originalIP !== $request->ip()) - { - Log::alert('User IP address changed from last login. Updating.', [ - 'prev' => $user->originalIP, - 'new' => $request->ip() - ]); - $user->originalIP = $request->ip(); - $user->save(); + if (!config('demo.is_enabled')) { + if ($user->originalIP !== $request->ip()) + { + Log::alert('User IP address changed from last login. Updating.', [ + 'prev' => $user->originalIP, + 'new' => $request->ip() + ]); + $user->originalIP = $request->ip(); + $user->save(); + } } } } diff --git a/webpack.mix.js b/webpack.mix.js index ed04aaf..cdcb6e5 100755 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -1,3 +1,5 @@ +let mix = require('laravel-mix'); + mix.js(['resources/js/app.js', 'resources/js/application_charts.js', 'resources/js/calendar.js'], 'public/js') .sass('resources/sass/app.scss', 'public/css');