Multi-Tenant Page Approach

Hi everyone. I have an app with multi-tenancy and it is working well with all the resources in such panel. For one resource, I had to create a new filament page (not associated with the resource) to do some simple mathematical operations. Sum of total columns and division to calculate percentages. this works great as well. The issue I have is that I cant filter the calculations by tenant. It just add all the values in the table . Can someone provide any advise please?
8 Replies
Patrick Boivin
Can you share some code to illustrate the issue?
RT2023
RT2023OP2y ago
sure. the component code is if($this->totalCredit != 0) { $this->result = $this->totalDebit / $this->totalCredit; } else { $this->result = "Cannot divide by zero."; } the blade code is if($this->totalCredit != 0) { $this->result = $this->totalDebit / $this->totalCredit; } else { $this->result = "Cannot divide by zero."; } what I get on my admin panel is :
RT2023
RT2023OP2y ago
No description
RT2023
RT2023OP2y ago
No description
RT2023
RT2023OP2y ago
if you see once I change the tenant from Bamba Acworth to Cielo Acworth the results are the same
DarkKnight
DarkKnight2y ago
pls use ```php ``` whenever you share code
RT2023
RT2023OP2y ago
sorry, my bad. this is a pdf of the code
RT2023
RT2023OP2y ago
No description

Did you find this page helpful?