namrata
Spatie Media Library
I am using spatie media library, and I have to pre fill the form and the form has media as well, I have the media in my s3 I can get the media but it is not loading the medias in the place where I can edit the medias like it would normally in any data edit. I am not using resource. I am using Livewire class, I am not able to use default, and the media is not showing in the form at all.
24 replies
Filters in page to change the widgets
Is there anyway to get the stats data to change as per the filters ?
I tried to use use BaseDashboard\Concerns\HasFiltersForm; but I did not get the filters in the top and. neither can access the filters in the widgets.
I tried to use use BaseDashboard\Concerns\HasFiltersForm; but I did not get the filters in the top and. neither can access the filters in the widgets.
3 replies
Default value in Select input
I want to set one value as default, but the default() is not working. I have had this problem many times. Is there an issue with Select or am I doing something wrong ?
php
Select::make('date_format')
->options([
'm/d/Y' => date('m/d/Y'), // Key is the format, value is the formatted date
'n/j/y' => date('n/j/y'),
'F j, Y' => date('F j, Y'),
'M j, Y' => date('M j, Y'),
])
->default('m/d/Y') // Set the key as the default, which corresponds to the formatted date
->label('Date Format'),
this is my code.23 replies
Filament page filter
I have this code where I have tried to pass date filter in my filament page. I made one similar type of report few months ago which works with this similar approad but this one is not working. Even when I pass the date filter the data is not changing in the view but the date is passing through.
https://gist.github.com/Namrata199/b913be06177c0b1317d334180e3826ce
26 replies
Custom option label in multiple select
I have tried getOptionLabelUsing and getOptionLabelFromRecordUsing() both but my the options are not as I wanted. I have faced this when the select field is multiple.
getOptionLabelFromRecordUsing() this works in single select option but not in multiple
30 replies
Multiple tableFilters in a Widget
I am creating a widget whoe vaue needs to change according to the filters used in the list page. But I am not being able to access the value in the widget. My getStats() function is being able to take the update filters value in case of the dates . The dates are updated as per the filter in the updateDateRange() function.
https://gist.github.com/Namrata199/e3a988ba719de06ae624b065b6d7b7d0
these are my files. I can't figure out what I have done wrong.
2 replies
Options Format
I want to format the way my options are shown , I used getOptionLabelFromRecordUsing() but it is only working in single select but it doesnot work with multiple(). What can I use in multiple select to format my options label ?
11 replies
Select filter throwing error when using relationship
This is my code and this gives error https://flareapp.io/share/w5BnMJv5#context-app-views . This is working in all my other resources except for this one. If I use any other filed like id or phone or anything else it takes a lot to load and crashes my whole application. But if I do
this works. Am I suppose to do it like this ? Also, when I use relationship in other resources as well, it gives all data not the relationships one.
7 replies
Passing date filter in other apis
I want to pass the value for the date filter to another api to form a report. I am not being able to apss teh vlaues in the api call.
this is my full code. https://gist.github.com/Namrata199/63f6b30b7b73bef395551033e4edd75e
2 replies