Accessing the current tenant
The documentation states that anywhere in the application, you can access the tenant model for the current request using Filament::getTenant(). However, when I call the Filament::getTenant() method inside an observer, it returns null. Filament::getTenant() only returns the current tenant within Filament resources. I need access to it inside a model, observer, or event. Is this possible?
1 Reply
It's tricky, because the observer could be running outside of a Filament request... (e.g. in a queued job, artisan command, etc.)