diff --git a/app/Http/Controllers/LoggingController.php b/app/Http/Controllers/LoggingController.php new file mode 100644 index 0000000..f59421a --- /dev/null +++ b/app/Http/Controllers/LoggingController.php @@ -0,0 +1,47 @@ +validated(); + + return Logging::join('users', 'login_activities.user_id', '=', 'users.id') + ->where(function (Builder $query) use ($request) { + $search = '%' . $request->search . '%'; + + $query->where('users.name', 'like', $search) + ->orWhere('users.username', 'like', $search) + ->orWhere('login_activities.ip_address', 'like', $search) + ->orWhere('login_activities.browser', 'like', $search) + ->orWhere('login_activities.platform', 'like', $search) + ->orWhere('login_activities.created_at', 'like', $search); + }) + ->when(!$request->user()->hasRole('superuser'), function (Builder $query) use ($request) { + $query->where('users.id', $request->user()->id); + }) + ->select(['users.*', 'login_activities.*']) + ->orderBy($request->input('order.key') ?: 'login_activities.created_at', $request->input('order.dir') ?: 'desc') + ->paginate($request->per_page ?: 10); + } +} diff --git a/config/app.php b/config/app.php index a93c88c..811b575 100644 --- a/config/app.php +++ b/config/app.php @@ -69,7 +69,7 @@ return [ | */ - 'timezone' => 'Asia/Jakarta', + 'timezone' => 'Europe/Bratislava', /* |-------------------------------------------------------------------------- diff --git a/resources/js/Layouts/GuestLayout.vue b/resources/js/Layouts/GuestLayout.vue index 0c0ced5..2488e6c 100644 --- a/resources/js/Layouts/GuestLayout.vue +++ b/resources/js/Layouts/GuestLayout.vue @@ -279,7 +279,7 @@ onMounted(fetch_menu);
It is a community project of a group of enthusiasts from Slovakia. - This service provides price comparison of Ikea products in European countries. - Product prices are converted to EUR at the current rate and appear in resulting table. - Information about the prices of Ikea products is obtained online. - You can go to the appropriate product page by clicking on the country name. - Thanks to this service, you can find out in which country a given Ikea product is the cheapest (you can sort - them in the resulting table). +This service provides price comparison of Ikea products in European countries. +
++Product prices are converted to appropriate currency (you can change it in settings menu) at the current rate and appear in resulting table. +You can go to the appropriate product page by clicking on the country name. +
+ ++Thanks to this service, you can find out in which country a given Ikea product is the cheapest (you can sort them in the resulting table).
-If you have some comments or ideas for improvement about project, let as know...
-