public function show($id, array $opts)
{
$model = $this->where($opts)->where('_id', $id)->first();
if ($model === null) {
throw new Exceptions\NotFound($id, $this->model);
}
return $this->format($model);
}
/** * Converts foreign ids to MongoIds, then * gets the model with the given ID and options. * @param String $id ID to match. * @param [String => Mixed] $opts * @return Model */ public function show($id, array $opts) { $opts['lrs_id'] = new \MongoId($opts['lrs_id']); return parent::show($id, $opts); }