Get the active tenant id
I have an action of removing a user in a company how can I get the active company Id of the login user

1 Reply
Is your "tenant" a Company? If it is you can get the current tenant :
$tenant = Filament::getTenant();
Ref: https://filamentphp.com/docs/3.x/panels/tenancy#accessing-the-current-tenant
or if tenant has nothing to do with the company, and you need the logged user's company, you should be able to get it like this: auth()->user()->companies()->first()
or apply a scope to filter the current one.