Spârky
Spârky
FFilament
Created by Spârky on 3/28/2024 in #❓┊help
Mutate pivot data on parent creation
Hello! I have 2 entities called "Contact" and "Message". I added a pivot table between them using BelongsToMany. I also added pivot data with ->withPivot(['confirmation_code', 'confirmation_date', 'status']) . On my form, I only want to create a Message with some fields and a select in which I choose the Contacts (receivers). The pivot data must not be modified by users, so I want to mutate the pivot data to generate a different 4-digit code for each Contact and initialize the status. How can I achieve this?
7 replies
FFilament
Created by Spârky on 6/20/2023 in #❓┊help
Using html() on a RichEditor-set value still rendering the tags
Hi guys! I noticed that the values set by a RichEditor in a form render with the tags in the tables, even when using html(). Did I misunderstand something? Thanks 🙂
9 replies
FFilament
Created by Spârky on 6/16/2023 in #❓┊help
Is it possible to prevent user to put end time earlier than start time with TimePickers ?
Hello ! I'm trying to make a form to show working hours but I can't find a way to prevent the user to set a endTime earlier than the startTime. Any ideas? I tried with reactive() and $get but the behaviour wasn't working as intended, could be my bad tho.
3 replies
FFilament
Created by Spârky on 3/31/2023 in #❓┊help
Make a graph to count records by month and year
Hi everyone, I have a Device model with a installation_date attribute. I'd like to build a line chart in a widget which shows how many devices have been installed per month. Some months will have 0 installations but they still have to be displayed in the graph. Also, I'd like to show the year on the months-axis (like 03-2023).
Has anyone an idea how to achieve that? Thanks!
3 replies