© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
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()

])
->headerActions([
Tables\Actions\AttachAction::make()

])

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

public function workingBuildings():BelongsToMany{
return $this->belongsToMany(Building::class);
}
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.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Call to undefined method App\Models\OrderLine::orderLines()
FilamentFFilament / ❓┊help
2y ago
Call to undefined method App\Models\Appointment::name()
FilamentFFilament / ❓┊help
3y ago
Call to undefined method App\Models\Projects::brand()?
FilamentFFilament / ❓┊help
3y ago
call to undefined method App\Models\Student::class()
FilamentFFilament / ❓┊help
3y ago