F alko
Explore posts from serversFormat state on empty column
I have table with width, height and length parameters.
When showing this in the table, I want to add a size column That shows width x height x length.
However, when one is null, I want to show
?
instead. When width is null, it doesn't hit the formatStateUsing method.
Is there a way to make a virtual column that is always resolved?5 replies
Format Pivot fields in Relation Manager
This is the table of my RelationManager.
I have a many-to-many relation with a view properties on my pivot.
I would like to add multiple pivot values together, but can't seem to find a way to do this.
Let's say I have a
User
object with a many-to-many relation with Subscription
.
This many-to-many has a Pivot model called SubscriptionUser
and pivot fields active
and expires_at
:
6 replies
Custom Image Edit fields
I have two cases where I need to do image manipulation in the frontend. One is an upload that people can draw on, another is an image that comes from a relation in another field and where you can add a marker.
Should I try to change the ImageField or go completely custom here? Are there any great examples on canvas fields? 😄
1 replies
Vue.js / custom tooling in Filament
I'm looking into porting a custom application with some Laravel Nova to Filament, but we have a few custom tools build in Vue.js.
Can we and should we implement these into the Filament application or should we try to avoid it and go for alpine?
Rebuilding is gonna be costly, and we have a lot of experienced Vue developers. Our knowledge of alpine and Livewire is lacking, but we'll probably manage.
If yes, how are we gonna achieve this? Is there an easy way to append our app.js to the custom Filament pages?
2 replies
Issue with money formatting
I have a price field that is an unsigned integer contain the value 450.
I expect to get €4.50, yet I get: €4.00. It seams to have a problem with minor units. Am I doing something wrong?
I am on Filament v3.0.60 btw.
6 replies
I want to use multi tenancy for different tools that are set from the same panel
So currently I have a Tool resource which I have set at the Tenant, with a ToolType enum to differentiate which tool we are currently working on.
Lets say we have a WineTool and a GiftBoxTool, then I want to have different resources available based on the ToolType.
So for instance, with the WineTool we have CorkWrappers and for the GiftBoxTool we have BoxFilling (paper, hay, etc).
Is there an easy way to hide the resources based on the tenant and a way to not have all relations set on the Tool model? When I have WineTool, I don't want to eager load the BoxFilling relation for instance.
3 replies
Customize ImageEditor to allow drawing
I want to customize the image editor to be able to draw on the image.
Looking at what is in the Filament package, I'm pretty sure it is not really extendable and my Alpine experience isn't amazing.
Any tips on how to get in there and change the popup to my own functionality ?
29 replies
Combination of Form and Table
Hey guys, I'm migrating from a Inertia / Vue.js application into a Livewire/Filament one.
Currently we have a table with inputs for bulk editing. It's for a list of supplier specific products and their prices, making it easy to update in one form. The data to edit is in a Pivot table on the
product_supplier
table.
What would be the best way to handle this in Filament? Is there a way to add form / input fields to a table or should I be looking into a custom page? If a custom page is the way to go, is there an easy way to use the Filament table and input components to make sure the styling is consistent?
Thanks in advance! 🥹6 replies