mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 20:22:18 +00:00
Save user IP to audit log
This commit is contained in:
parent
5cf0c99e32
commit
8efaeb068b
@ -11,6 +11,7 @@ use BookStack\Interfaces\Loggable;
|
|||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Facades\Request;
|
||||||
|
|
||||||
class ActivityService
|
class ActivityService
|
||||||
{
|
{
|
||||||
@ -58,6 +59,7 @@ class ActivityService
|
|||||||
return $this->activity->newInstance()->forceFill([
|
return $this->activity->newInstance()->forceFill([
|
||||||
'type' => strtolower($type),
|
'type' => strtolower($type),
|
||||||
'user_id' => user()->id,
|
'user_id' => user()->id,
|
||||||
|
'ip' => Request::ip(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user