* Fixed #892

* #892 test added
This commit is contained in:
Kirill Uksusov
2020-03-03 10:48:00 +01:00
committed by GitHub
parent edd69c5e05
commit e743f44011
3 changed files with 25 additions and 1 deletions
@@ -36,6 +36,16 @@ class Simple extends Model
return $this->belongsToMany(Simple::class);
}
public function relationBelongsToManyWithSub(): BelongsToMany
{
return $this->belongsToMany(Simple::class)->where('foo', 'bar');
}
public function relationBelongsToManyWithSubAnother(): BelongsToMany
{
return $this->relationBelongsToManyWithSub()->where('foo', 'bar');
}
public function relationMorphTo(): MorphTo
{
return $this->morphTo();