public function getRoute() { if ($this->is_recurring) { $entityType = 'recurring_invoice'; } else { $entityType = $this->getEntityType(); } return "/{$entityType}s/{$this->public_id}/edit"; }