Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tariqbilal's avatar

Tenant is null

I am using

https://tenancyforlaravel.com/

Package but in my local environment tenant()

Is always null inside the jobs and mails.

0 likes
2 replies
tariqbilal's avatar

Issue is tenant helper is giving empty value in Mailer

Raymond7905-36502477's avatar

@tariqbilal I started having this problem after upgrading to tenancy 3.8.5. I assume your emails are queued? If so, I believe they are being run in the central context, also due to the nature of serverless. I also assume you have all the correct middleware setup?

To get around this, explicitly set your tenant on the constructor. So that you don’t need to use the tenant() helper. Basically give the mailer the tenant directly.

Please or to participate in this conversation.