model) { $properties = $remoteProcessArgs->toArray(); unset($properties['model']); $this->activity = activity() ->withProperties($properties) ->performedOn($remoteProcessArgs->model) ->event($remoteProcessArgs->type) ->log("[]"); } else { $this->activity = activity() ->withProperties($remoteProcessArgs->toArray()) ->event($remoteProcessArgs->type) ->log("[]"); } } public function __invoke(): Activity { $job = new CoolifyTask($this->activity); dispatch($job); $this->activity->refresh(); return $this->activity; } }