Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for withTrashed() and onlyTrashed() ? #88

Open
avramovic opened this issue Oct 12, 2016 · 0 comments
Open

Support for withTrashed() and onlyTrashed() ? #88

avramovic opened this issue Oct 12, 2016 · 0 comments

Comments

@avramovic
Copy link

I'm using SoftDeletes on my model and if I try to query trashed models it doesn't seem to work.

First I've tried this:

$item = $itemRepo->withTrashed()->all();

It says there is no method withTrashed() on my repository. Then I tried to make criteria:

...
public function apply($model, Repository $repository) {
  return $model->withTrashed();
}
...

...but it says there is no method withTrashed() on Builder class. It seems $model here is the query builder, not the model itself.

Same goes for onlyTrashed(). Is there any way to use these methods with your Repository package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant