MongolidLaravel\MongolidModel::firstOrFail PHP 메소드

firstOrFail() 공개 정적인 메소드

Gets the first entity of this kind that matches the query. If no document was found, throws ModelNotFoundException.
public static firstOrFail ( mixed $query = [], array $projection = [], boolean $useCache = false ) : ActiveRecord
$query mixed MongoDB selection criteria.
$projection array Fields to project in Mongo query.
$useCache boolean Retrieves the entity through a CacheableCursor.
리턴 Mongolid\ActiveRecord
    public static function firstOrFail($query = [], array $projection = [], bool $useCache = false)
    {
        return static::callMockOrParent('firstOrFail', func_get_args());
    }