FilamentF
Filament16mo ago
Daniel

Call to undefined method App\Models\User::buildings()

I have this method in my relationManager of buildings with users
->headerActions([
Tables\Actions\AttachAction::make()

])

However, in my User model the method is called workingBuildings :

public function workingBuildings():BelongsToMany{
return $this->belongsToMany(Building::class);
}
How can I customize the name of the relationship? ->relationship does not exist for this action.
Was this page helpful?