From 70303c2b2de953acd4e1bbf6712daa7f40da37a5 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 14 Dec 2023 14:33:25 +0000 Subject: [PATCH] Added searchable fields, improved formatting Signed-off-by: snipe --- app/Models/Actionlog.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/app/Models/Actionlog.php b/app/Models/Actionlog.php index 7e24b839ec..9f87ffd8c2 100755 --- a/app/Models/Actionlog.php +++ b/app/Models/Actionlog.php @@ -25,7 +25,17 @@ class Actionlog extends SnipeModel protected $table = 'action_logs'; public $timestamps = true; - protected $fillable = ['created_at', 'item_type', 'user_id', 'item_id', 'action_type', 'note', 'target_id', 'target_type', 'stored_eula']; + protected $fillable = [ + 'created_at', + 'item_type', + 'user_id', + 'item_id', + 'action_type', + 'note', + 'target_id', + 'target_type', + 'stored_eula' + ]; use Searchable; @@ -34,7 +44,15 @@ class Actionlog extends SnipeModel * * @var array */ - protected $searchableAttributes = ['action_type', 'note', 'log_meta','user_id']; + protected $searchableAttributes = [ + 'action_type', + 'note', + 'log_meta', + 'user_id', + 'remote_ip', + 'user_agent', + 'action_source' + ]; /** * The relations and their attributes that should be included when searching the model.