uzdacpdz (Doug Dimmadome)
uzdacpdz (Doug Dimmadome)
FFilament
Created by uzdacpdz (Doug Dimmadome) on 7/3/2024 in #❓┊help
tenancy without "{tenantslug}" in URL, and use sesion instead
Hi, I'm experimenting with altering the current tenant resolving logic. Right now Filament uses the {tenant} parameter in the URL, but I'd like to remove it and fetch it from the session. Anybody who can guide me? Right now I am manually altering all routes in a custom service provider (removing the IdentifyTenant middleware and {tenant} parameter) and adding my own middleware that sets the tenant from the session. But it just feels extremely hacky 🤔 Any thoughts? 😄
2 replies
FFilament
Created by uzdacpdz (Doug Dimmadome) on 10/2/2023 in #❓┊help
Accessing table query from stat widget (but inside the ViewRecord page)
Hi all! I am trying to access the table query from a specific table on a ViewRecord page in my resource. https://filamentphp.com/docs/3.x/panels/resources/widgets#accessing-page-table-data-in-the-widget I came accross this piece of docs, and it works great on my ListRecords page, but I was wondering if there is a way to also fetch the query of a table on my ViewRecord page. More specifically, a table that is owned by a relation manager. I tried the trait on as well the ViewRecord page as the RelationManager, but I haven't had any luck so far. Thanks!
8 replies
FFilament
Created by uzdacpdz (Doug Dimmadome) on 9/27/2023 in #❓┊help
Creating eloquent relationship model from table
Hi all! I can't seem to figure out how I would do the following: Lets say I have a table containing Cars, it nicely lists a bunch of cars with basic actions like editing and deleting (assume it's a simple resource so no dedicated pages for that - just modals). What if I'd want to add an action for example, RegisterDriverAction, in which it would open the form for the Driver resource, and when the user fills in the Driver information, it creates the driver and adds it to the car, all inside the table (via a modal). I looked into the relationship managers but they don't seem to offer any functionality like the on described above. I also tried creating a Filament\Tables\Actions\CreateAction and changing the record and model on that action to the Driver class, but that doesnt' work either. Any ideas or anything that can point me in the right direction would be greatly appreciated! Thanks 🙂
5 replies
FFilament
Created by uzdacpdz (Doug Dimmadome) on 8/14/2023 in #❓┊help
Refreshing custom page header widgets
Is there anyway to refresh all headerWidgets on a custom page? I can't seem to find a way for it and just using $refresh doesn't seem to be working.
2 replies
FFilament
Created by uzdacpdz (Doug Dimmadome) on 8/10/2023 in #❓┊help
Default grouping direction
Is there any way we can set up the default grouping direction so that it is desc instead of asc ? I think right now it is not really possible given the below line, where the asc is hard-coded: https://github.com/filamentphp/filament/blob/c634245cd64af3dc06bd0d7ba40d5d2b76b96b38/packages/tables/resources/views/components/groups.blade.php#L28
12 replies