/** * @param Model $modelAbstractor * * @return null|CustomController */ private function customController(Model $modelAbstractor) { if (!$this instanceof CustomController) { //Avoid infinite recursion if (array_key_exists('controller', $config = $modelAbstractor->getConfig()) && !empty($config['controller'])) { /** @var CustomController $controller */ $controller = App::make($config['controller']); $controller->setAbstractor($modelAbstractor); return $controller; } } }
/** * @return Collection */ public function getSecondaryRelations() { return $this->modelAbstractor->getRelations(); }