check()) { return; } $user = auth()->user(); $user_id = $user->id; $ip_address = request()->ip(); $url = request()->fullUrl(); $userLog = new UserLog; $userLog->user_id = $user_id; $userLog->institute_id = getUserRestaurantId(); $userLog->user_id = $user_id; $userLog->ip_address = $ip_address; $userLog->action = $action; $userLog->detail = $detail; $userLog->model = $model; $userLog->url = $url; $userLog->model_id = $model_id; $userLog->save(); } catch (\Throwable $th) { // } } }