Illuminate\Database\Eloquent\Model::getRelation PHP Method

getRelation() public method

Get a specified relationship.
public getRelation ( string $relation ) : mixed
$relation string
return mixed
    public function getRelation($relation)
    {
        return $this->relations[$relation];
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Get a specified relationship.
  *
  * @param  string $relation
  *
  * @return mixed
  */
 public function getRelation($relation)
 {
     return $this->dynamicRelation($relation) ?: parent::getRelation($relation);
 }
All Usage Examples Of Illuminate\Database\Eloquent\Model::getRelation
Model