public getOrFail ( ) : |
||
리턴 |
public function getOrFail()
{
$model = $this->get();
if (is_null($model)) {
throw new ParentModelNotFoundException($this->parentClass, $this->child->getParentId());
}
return $model;
}