Some better activity translations
This commit is contained in:
parent
cf01490883
commit
76472411e3
5 changed files with 34 additions and 13 deletions
|
@ -81,7 +81,7 @@ class ActivityLogTransformer extends BaseClientTransformer
|
|||
}
|
||||
|
||||
$str = trans('activity.' . str_replace(':', '.', $model->event));
|
||||
preg_match_all('/:(?<key>[\w-]+)(?:\W?|$)/', $str, $matches);
|
||||
preg_match_all('/:(?<key>[\w.-]+\w)(?:[^\w:]?|$)/', $str, $matches);
|
||||
|
||||
$exclude = array_merge($matches['key'], ['ip', 'useragent']);
|
||||
foreach ($model->properties->keys() as $key) {
|
||||
|
|
Reference in a new issue