Added searchable fields, improved formatting

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-12-14 14:33:25 +00:00
parent 4dac3712a6
commit 70303c2b2d

View file

@ -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.