log = $log; $this->category_id = $category_id; $this->event_id = $event_id; $this->type_id = $type_id; $this->client = $client; } public function handle() :void { if(!$this->client) return; $sl = [ 'client_id' => $this->client->id, 'company_id' => $this->client->company->id, 'user_id' => $this->client->user_id, 'log' => $this->log, 'category_id' => $this->category_id, 'event_id' => $this->event_id, 'type_id' => $this->type_id, ]; if(!$this->log) return; SystemLog::create($sl); } }