diff --git a/app/Filament/Server/Resources/AllocationResource.php b/app/Filament/Server/Resources/AllocationResource.php index 9719cc975..1e4a03275 100644 --- a/app/Filament/Server/Resources/AllocationResource.php +++ b/app/Filament/Server/Resources/AllocationResource.php @@ -77,7 +77,7 @@ class AllocationResource extends Resource Activity::event('server:allocation.delete') ->subject($allocation) - ->property('allocation', $allocation->toString()) + ->property('allocation', $allocation->address) ->log(); }), ]); diff --git a/app/Filament/Server/Resources/AllocationResource/Pages/ListAllocations.php b/app/Filament/Server/Resources/AllocationResource/Pages/ListAllocations.php index ee9526cc3..ad32aed40 100644 --- a/app/Filament/Server/Resources/AllocationResource/Pages/ListAllocations.php +++ b/app/Filament/Server/Resources/AllocationResource/Pages/ListAllocations.php @@ -32,7 +32,7 @@ class ListAllocations extends ListRecords Activity::event('server:allocation.create') ->subject($allocation) - ->property('allocation', $allocation->toString()) + ->property('allocation', $allocation->address) ->log(); }), ]; diff --git a/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php b/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php index 55e8023ac..c287addb6 100644 --- a/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php +++ b/app/Http/Controllers/Api/Client/Servers/NetworkAllocationController.php @@ -62,7 +62,7 @@ class NetworkAllocationController extends ClientApiController if ($original !== $allocation->notes) { Activity::event('server:allocation.notes') ->subject($allocation) - ->property(['allocation' => $allocation->toString(), 'old' => $original, 'new' => $allocation->notes]) + ->property(['allocation' => $allocation->address, 'old' => $original, 'new' => $allocation->notes]) ->log(); } @@ -87,7 +87,7 @@ class NetworkAllocationController extends ClientApiController Activity::event('server:allocation.primary') ->subject($allocation) - ->property('allocation', $allocation->toString()) + ->property('allocation', $allocation->address) ->log(); return $this->fractal->item($allocation) @@ -114,7 +114,7 @@ class NetworkAllocationController extends ClientApiController Activity::event('server:allocation.create') ->subject($allocation) - ->property('allocation', $allocation->toString()) + ->property('allocation', $allocation->address) ->log(); return $this->fractal->item($allocation) @@ -148,7 +148,7 @@ class NetworkAllocationController extends ClientApiController Activity::event('server:allocation.delete') ->subject($allocation) - ->property('allocation', $allocation->toString()) + ->property('allocation', $allocation->address) ->log(); return new JsonResponse([], JsonResponse::HTTP_NO_CONTENT); diff --git a/app/Models/Allocation.php b/app/Models/Allocation.php index 39ae0ad60..bb642244f 100644 --- a/app/Models/Allocation.php +++ b/app/Models/Allocation.php @@ -121,11 +121,6 @@ class Allocation extends Model ); } - public function toString(): string - { - return $this->address; - } - /** * Gets information for the server associated with this allocation. */