Remove Manage Subscription from tenant menu
I have a multi-tenant application and I'm using Laravel Spark for billing.
In my
AppPanelProvider
I have the following:
No matter what I do I can't seem to get the tenantMenuItem
for managing subscription to go from the front end (screenshot showing what I mean). I have it under userMenuItems
, which is where I want it but I've tried the following and I can't get rid of it:
1. Remove the code from tenantMenuItems
, no impact
2. Set the visibility to false, no impact
Does anyone have any other ideas about how to remove the entry in the tenant menu?Solution:Jump to solution
Yes, probably Spark... Did you create the
/billing
route by yourself?
You may want to try commenting this line in you Panel:
->tenantBillingProvider(new SparkBillingProvider());
and see if the link is still present......7 Replies
I don't know if I am understanding right, but as you defined 2 identical menu entries (subscription), you may see the second when you hide the first, no?
Could you try just renaming your entries, like:
Manage subscription (tenant)
and Manage subscription (user)
for better understanding/debugging?Hi @micraux sorry, I confused things with how I was showing the code.
If I remove "Manage subscription" from the tenantMenuItems
However, in the tenant menu, I'm still getting the "Manage subscription" option as well as the "Manage subscription1" in the user menu.
I've attached screenshots of the tenant menu and the user menu.
Oh I see, quite strange..
I wonder where the "Manage subscription" (from Tenant menu) comes from!
Is this coming from a Filament Plugin?
I don't think so but I can't think where else it would be coming from. Below is a list of the composer packages that the project has. Spark billing provider seems the most likely, but I can't find anything that seems to suggest it will do that automatically.
Anyone have any thoughts on what might be causing it? I'm starting to think I'm going to have to write some JS to hide it in the front end but I would much rather figure out why it's showing.
Solution
Yes, probably Spark... Did you create the
/billing
route by yourself?
You may want to try commenting this line in you Panel:
->tenantBillingProvider(new SparkBillingProvider());
and see if the link is still present...@micraux sorry for the slow response. Thanks for this. I'm not sure why, but initially, when I removed it, the application wouldn't work, but it seems fine now. I blame user error 😄