Eloquent morphTo()->withTrashed() stopped working
问题 I have a polymorphic relationship set up in an OrderItem model, where saleable can be a few different models. I've set it up like any other relationship: public function saleable() { return $this->morphTo()->withTrashed(); } This used to work fine, now all of a sudden it doesn't work and it throws the error: Call to undefined method Illuminate\Database\Query\Builder::withTrashed() I don't understand why it would have stopped working, possibly due to a composer update which may have updated