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

Call to undefined method withTrashed() #297

Closed
MustafaHussaini opened this issue Oct 29, 2017 · 3 comments
Closed

Call to undefined method withTrashed() #297

MustafaHussaini opened this issue Oct 29, 2017 · 3 comments

Comments

@MustafaHussaini
Copy link

MustafaHussaini commented Oct 29, 2017

when i set 'subject_returns_soft_deleted_models' => true

{{ "success":false,"error":{"code":0,"message":"Call to undefined method Illuminate\\Database\\Query\\Builder::withTrashed()" }}

laravel v5.5
laravel-activitylog 2.2

@freekmurze
Copy link
Member

Make sure your model uses the SoftDeletes trait.

// in your model
    use SoftDeletes;

@MustafaHussaini
Copy link
Author

all models should use the SoftDeletes trait?
I have some models with no softDeletes support.
one thing more can we revert changes?

@bluec
Copy link

bluec commented Nov 7, 2018

Same problem in #456 I don't feel forcing all our models to use SoftDeletes trait is a solution

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

3 participants