class User extends Model { use StaudenmeirEloquentHasManyDeepHasRelationships; public function cards() { return $this->hasManyDeep(Card::class, [Subject::class, Deck::class]); } }