Custom column to display a pivot of the current user and tenancy relationship
I would like to display a boolean column of the users and the currenty tenant relation in a table and I am a bit lost. Can someone point me to the right direction? Thanks
public function getAcceptedForCurrentTenantAttribute()
{
$userTenant = $this->tenants->firstWhere('id', \Filament\Facades\Filament::getTenant()->id);
return $userTenant ? $userTenant->pivot->accepted : 'N/A';
}TextColumn::make('Accepted for Current Tenant', 'acceptedForCurrentTenant')