url to path

This commit is contained in:
Dr Masroor Ehsan 2024-12-31 12:13:46 +06:00
parent cdd776b7ec
commit a12585b7f0

View File

@ -75,7 +75,7 @@ public function category(int $category): static
public function url(?string $url = null): static
{
$this->url = $url ?? request()->url();
$this->url = $url ?? request()->path();
return $this;
}
@ -127,17 +127,18 @@ public function log(bool $initDefaults = true): bool
}
}
return DB::table('audit_logs')->insert([
'study_id' => $this->studyId,
'user_id' => $this->userId,
'category' => $this->category,
'activity' => $this->activity,
'orthanc_uuid' => $this->orthancId,
'ip_addr' => $this->ipAddr,
'user_agent' => $this->userAgent,
'url' => $this->url,
'notes' => $this->notes,
'created_at' => now(),
]);
return DB::table('audit_logs')
->insert([
'study_id' => $this->studyId,
'user_id' => $this->userId,
'category' => $this->category,
'activity' => $this->activity,
'orthanc_uuid' => $this->orthancId,
'ip_addr' => $this->ipAddr,
'user_agent' => $this->userAgent,
'url' => $this->url,
'notes' => $this->notes,
'created_at' => now(),
]);
}
}