]>
BookStack Code Mirror - bookstack/commitdiff
projects
/
bookstack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
5cf0c99
)
Save user IP to audit log
author
Zero
<redacted>
Fri, 27 Aug 2021 04:42:02 +0000
(12:42 +0800)
committer
Zero
<redacted>
Mon, 20 Sep 2021 03:29:14 +0000
(11:29 +0800)
app/Actions/ActivityService.php
patch
|
blob
|
history
diff --git
a/app/Actions/ActivityService.php
b/app/Actions/ActivityService.php
index dce7dc7b2595df00a1652bcfbcce7124de811b62..87cb075aee4fdb68fbae7e19a978304c886b8299 100644
(file)
--- a/
app/Actions/ActivityService.php
+++ b/
app/Actions/ActivityService.php
@@
-11,6
+11,7
@@
use BookStack\Interfaces\Loggable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Support\Facades\Log;
+use Illuminate\Support\Facades\Request;
class ActivityService
{
@@
-58,6
+59,7
@@
class ActivityService
return $this->activity->newInstance()->forceFill([
'type' => strtolower($type),
'user_id' => user()->id,
+ 'ip' => Request::ip(),
]);
}