Illuminate\Database\Eloquent\Model::getArrayableRelations PHP Метод

getArrayableRelations() защищенный Метод

Get an attribute array of all arrayable relations.
protected getArrayableRelations ( ) : array
Результат array
    protected function getArrayableRelations()
    {
        return $this->getArrayableItems($this->relations);
    }

Usage Example

Пример #1
0
 /**
  * @return array
  */
 protected function getArrayableRelations()
 {
     $result = parent::getArrayableRelations();
     // To fix #17 when converting tree to json falling to infinite recursion.
     unset($result['parent']);
     return $result;
 }
Model