states)) { $this->states = $this->runFactory('states'); } return $this->states; } protected Contract\State $current; public function currentState(): Contract\State { if (!isset($this->current)) { $this->current = last($this->states()); } return $this->current; } protected function jsonComplement(): array { return [ 'project_id' => $this->project->id, 'broker_rut' => $this->broker->rut, 'commission' => $this->commission, 'states' => $this->states(), 'current' => $this->currentState(), ]; } }