Rahul
Rahul
FFilament
Created by Rahul on 4/24/2024 in #❓┊help
DateTimePicker Issue
I am using DateTimePicker field i am using its timezone method i need to show in ui date time in according to timezone() but in db it should save in utc my timezone is 'Asia/Kolkata' its working for that its showing in ui my timezone and saving date in utc in db too but if i put any other time zone its not working its showing time as my local timezone and also not saving data in utc. Forms\Components\DateTimePicker::make('start_time') ->timezone(config('app.user_timezone')) ->required(),
2 replies
FFilament
Created by Rahul on 4/4/2024 in #❓┊help
Video Durations(Hours and Seconds)
I want to save the duration of a video in my database. Is there any field to save it( in hours and seconds)?
5 replies
FFilament
Created by Rahul on 3/28/2024 in #❓┊help
Previewing Images from Database in File Upload Section
I have an image URL stored in my database that was inserted directly, but I want to preview that image in my file upload section. Is there any way to do so?
7 replies
FFilament
Created by Rahul on 3/22/2024 in #❓┊help
Error Displaying '[object Object]' in Video Link Field When Switching Upload Options
I have a select field named 'video type,' with two options: 'upload by link' and 'file upload.' When I choose an option, it displays the corresponding field. However, I encounter an issue: when I select 'file upload' and upload a file, and then switch to the 'upload by link' option in the 'video type' field, the 'video link' field displays '[object Object]' in array format. How can I fix this? Here's my code: Select::make('video_type') ->reactive() ->options([ "link" => "Upload By Link", "upload" => "File Upload" ]), TextInput::make('video_url') ->id('link-field') ->required() ->reactive() ->hidden(fn (Closure $get) => empty($get('video_type')) || $get('video_type') == "upload") ->afterStateHydrated( function ($state, $component, $record) { if ($state) { return $component->state($state); } } ), FileUpload::make('video_url') ->id('upload-field') ->required() ->reactive() ->hidden(fn (Closure $get) => empty($get('video_type')) || $get('video_type') == "link") ->disk('local') ->afterStateHydrated( function ($state, $component, $record) { if ($state) { return $component->state($state); } } ), I want the field name 'video_url' to be used for both file upload and text input, as I intend to store my link in that field.
3 replies
FFilament
Created by Rahul on 2/23/2024 in #❓┊help
Custom Action Buttons Policy Conflict
use Filament\Pages\Actions\Action; I have created a custom 'Edit' action button in the table action section of the resource, and also created a custom 'Create' action button on the list page. Due to this setup, my policy is not working as intended. This means that within the 'viewAny' permission, it includes both editing existing records and creating new ones
4 replies
FFilament
Created by Rahul on 2/7/2024 in #❓┊help
Select Field Options Key And Value
i have select options like this Select::make('game') ->options([ "f" => "football", "c" => "cricket", ]), and i do want to modify the key value i.e f,c so as in database it save with key value i.e f,c so in the list page table column it showing me with that key value i.e f,c but i want in table column it show me football,cricket like that. so how to fix this ??
5 replies
FFilament
Created by Rahul on 1/17/2024 in #❓┊help
File Upload Issue with Avatar: MaxSize Validation Not Working
In the file upload, I use avatar() and apply maxSize(1024) for validation. However, the maxSize validation is not working when I am using the avatar. here is the code: FileUpload::make('profile_image') ->label('') ->image() ->avatar() ->panelAspectRatio('1:1') ->panelLayout('integrated') ->maxSize(1024) ->columnSpanFull(),
4 replies
FFilament
Created by Rahul on 1/12/2024 in #❓┊help
Navigation from Tabs to Custom Page
I have a settings resource with two tabs created using getTabs(). When I click on the second tab, I want it to navigate to a custom page that I have created. How can I achieve this ?
7 replies
FFilament
Created by Rahul on 12/22/2023 in #❓┊help
Rendering Modified User Form View from Vendor File
I have modified some code in the vendor file of a user resource, specifically in the "create user" form. Now, I want to render that view on the "create user" form. How can I do it?
10 replies
FFilament
Created by Rahul on 12/11/2023 in #❓┊help
Trouble with CheckboxList and Group Rendering
No description
5 replies
FFilament
Created by Rahul on 11/1/2023 in #❓┊help
Do I Need To Register a Custom Resource Page ??
I have created a custom resource page. Do I need to register it with the app service provider or the app panel provider ?
6 replies
FFilament
Created by Rahul on 10/31/2023 in #❓┊help
Troubleshooting Default Value Display in Custom Resource Page
I have built a custom resource page, and inside it, I have a 'mount' function. However, the default value doesn't appear when I click on the 'Send Email' button and I want to be able to edit the page after receiving the default value and save the edited data in the database. How can I do this?
5 replies
FFilament
Created by Rahul on 10/25/2023 in #❓┊help
Execution Order Change Causing Filter Value Mismatch in Filament-v3 Widget
I have designed a filter inside a widget that extends from TableWidget. Within this widget, I have implemented two functions: getTableQuery() and getTableFilters(). Now, I am in the process of upgrading this widget from Filament-v2 to Filament-v3. In Filament-v2, getTableFilters() is executed first, and based on its output, getTableQuery() is subsequently executed. However, in Filament-v3, the order of execution has changed. It now directly executes getTableQuery, and this change is causing issues, as when I select a value from the filter, the data is not fetched correctly. Is there any alternative method or solution available that would allow me to access the current filter value? in the v2 it is written like this $month_selected = $this->getTableFilterState("attendance_month")["value"]; while getTableFilterState() is not working in v3 so in the v3 i write like this $month_selected = $this->tableFilters['attendance_month']['value']; Initially, when I dump $month_selected in version 3, it returns a null value. However, after selecting another month, such as April, and then dumping $month_selected, it displays the previously selected month, in this case, October. and also when i dd($this->tableFilters) it returns a null value. In Filament-v2, getTableFilters() executes first, and then getTableQuery(), which works perfectly. In Filament-v3, getTableQuery() executes first, causing this issue. Any insights on how to address this problem would be greatly appreciated.
20 replies