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
Can you share some code to illustrate the issue?
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 :
if you see once I change the tenant from Bamba Acworth to Cielo Acworth the results are the same
pls use
```php
```
whenever you share code
sorry, my bad. this is a pdf of the code