示例#1
0
 /**
  * @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;
         }
     }
 }
示例#2
0
文件: Relation.php 项目: anavel/crud
 /**
  * @return Collection
  */
 public function getSecondaryRelations()
 {
     return $this->modelAbstractor->getRelations();
 }