public function index(array $opts) { return $this->where($opts)->get()->each(function (Model $model) { return $this->format($model); }); }