FOF30\Model\DataModel::firstOrFail PHP 메소드

firstOrFail() 공개 메소드

Return the first item found or throw a \RuntimeException
public firstOrFail ( ) : static
리턴 static
    public function firstOrFail()
    {
        $item = $this->get(true, 0, 1)->first();
        if (is_null($item)) {
            throw new NoItemsFound(get_class($this));
        }
        return $item;
    }