F
Filament15mo ago
RT2023

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
Patrick Boivin15mo ago
Can you share some code to illustrate the issue?
RT2023
RT2023OP15mo 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
RT2023OP15mo ago
No description
RT2023
RT2023OP15mo ago
No description
RT2023
RT2023OP15mo ago
if you see once I change the tenant from Bamba Acworth to Cielo Acworth the results are the same
DarkKnight
DarkKnight15mo ago
pls use ```php ``` whenever you share code
RT2023
RT2023OP15mo ago
sorry, my bad. this is a pdf of the code
RT2023
RT2023OP15mo ago
No description
Want results from more Discord servers?
Add your server