entity) { return $this->entity; } $paramName = $this->entityType . 's'; $publicId = $this->$paramName ?: (Input::get('public_id') ?: Input::get('id')); if ( ! $publicId) { return null; } $class = Utils::getEntityClass($this->entityType); $this->entity = $class::scope($publicId)->withTrashed()->firstOrFail(); return $this->entity; } }