larastan: Call to an undefined method `withTrashed` - SoftDeletes
$project = $task->project()->withTrashed()->first();
Produce:
Call to an undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::withTrashed().
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 48 (6 by maintainers)
@antonkomarev Thanks for reporting this issue.
I need to think in a solution for this. Since those methods
withTrashed, etc are local instance macros instead of global macros.Give me some time to think.
I am in holidays. I will be back on the 27 August. On Tue 31 Jul 2018 at 10:26, Eric Lagarda notifications@github.com wrote:
Just added support to soft deletes
v0.3.3. Can you folks run some tests?@nunomaduro Could you investigate this one?
Guys I found the answer for me, I had the same issue because I changed
__construct()method in my model, but forgot to putparent::__construct();in the beginning of this methodI am getting the same error.
@nunomaduro Very nice job. Thank you. Larastan knows almost 100% of Laravel.