mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
[fix] allow BelongsToThrough with tenant. (#18040)
Signed-off-by: Mathieu TUDISCO <oss@mathieutu.dev>
This commit is contained in:
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
use LogicException;
|
||||
use Znck\Eloquent\Relations\BelongsToThrough;
|
||||
|
||||
trait BelongsToTenant
|
||||
{
|
||||
@@ -176,7 +177,7 @@ trait BelongsToTenant
|
||||
|
||||
$relationship = static::getTenantOwnershipRelationship($record);
|
||||
|
||||
if ($relationship instanceof BelongsTo) {
|
||||
if ($relationship instanceof BelongsTo || $relationship instanceof BelongsToThrough) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user