Use auth()->id() instead of Auth::id()

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2024-09-19 17:31:46 +01:00
parent b247fc33b9
commit 822ea96dfd
11 changed files with 20 additions and 17 deletions
+2 -2
View File
@@ -183,7 +183,7 @@ class License extends Depreciable
$logAction = new Actionlog;
$logAction->item_type = self::class;
$logAction->item_id = $license->id;
$logAction->created_by = Auth::id() ?: 1; // We don't have an id while running the importer from CLI.
$logAction->created_by = auth()->id() ?: 1; // We don't have an id while running the importer from CLI.
$logAction->note = "deleted ${change} seats";
$logAction->target_id = null;
$logAction->logaction('delete seats');
@@ -215,7 +215,7 @@ class License extends Depreciable
$logAction = new Actionlog();
$logAction->item_type = self::class;
$logAction->item_id = $license->id;
$logAction->created_by = Auth::id() ?: 1; // Importer.
$logAction->created_by = auth()->id() ?: 1; // Importer.
$logAction->note = "added ${change} seats";
$logAction->target_id = null;
$logAction->logaction('add seats');