public firstOrFail ( mixed $query = [], array $projection = [], boolean $cacheable = false ) : mixed | ||
$query | mixed | MongoDB query to retrieve the document. |
$projection | array | Fields to project in Mongo query. |
$cacheable | boolean | Retrieves the first through a CacheableCursor. |
return | mixed | First document matching query as an $this->schema->entityClass object |