Isswp101\Persimmon\ElasticsearchModel::firstOrFail PHP 메소드

firstOrFail() 공개 정적인 메소드

Execute the query and get the first result or throw an exception.
public static firstOrFail ( QueryBuilder | array $query = [] ) : static
$query Isswp101\Persimmon\QueryBuilder\QueryBuilder | array
리턴 static
    public static function firstOrFail($query = [])
    {
        $model = static::first($query);
        if (is_null($model)) {
            throw new ModelNotFoundException(get_called_class());
        }
        return $model;
    }