Garadit
Garadit
FFilament
Created by Garadit on 10/31/2024 in #❓┊help
Lazy load table column
I had a table where one of the columns took a long time to compute. It caused the table to load longer because of that one column. Can the table builder implement some sort of lazy loading for columns in the table without implementing deferLoading() for the table as a whole? I appreciate all the answers and help, Thank you.
18 replies
FFilament
Created by Garadit on 8/5/2024 in #❓┊help
How is demo.filamentphp.com deployed?
I was wondering how filamentphp deploys their demo site because it feels so fast when accessed. For comparison, I use aaPanel (nginx) on a VPS with 8GB RAM. It takes 3.09 seconds just to load the default dashboard page without dynamic widgets. While demo.filamentphp.com only takes 900ms to load the dashboard containing dynamic tables. So, is the demo using a container or using a panel-based service like cPanel, Plesk, etc.?
9 replies
FFilament
Created by Garadit on 6/24/2024 in #❓┊help
Dynamic Repeater Field
No description
2 replies
FFilament
Created by Garadit on 4/4/2024 in #❓┊help
Is it possible to implement HasOne relationship in Registration page?
I am trying to register the user with overriding default Register pages to have Wizard and Fieldset. Is it possible or not?
Forms\Components\Fieldset::make()
->relationship('userDetail')
->schema([
Wizard\Step::make('Data Diri')
->schema([
Forms\Components\TextInput::make('name')
->label('Nama Lengkap')
->required(),
Forms\Components\Select::make('province_id')
->label('Provinsi')
->options([]),
]),
]),
Forms\Components\Fieldset::make()
->relationship('userDetail')
->schema([
Wizard\Step::make('Data Diri')
->schema([
Forms\Components\TextInput::make('name')
->label('Nama Lengkap')
->required(),
Forms\Components\Select::make('province_id')
->label('Provinsi')
->options([]),
]),
]),
5 replies
FFilament
Created by Garadit on 3/15/2024 in #❓┊help
Importer causing server restart
What I am trying to do: Import data from .csv file with some data modification. The .csv data only contain the object code (let's say Curriculum code) like "C13". But my database column requires the Curriculum ID, so I want to match it with the code from the.csv file and then store the ID in the database. What I did: I have an Importer class that functions to import product data from .csv. In this class I use the castStateUsing method to get the ID for the foreign key. My issue/the error: However, when I imported, the development server suddenly changed its port, which was all 8000, to 8001. And the import was not successful, and there was no error log whatsoever. Code:
ImportColumn::make('curriculum_id')
->label('Kurikulum')
->requiredMapping()
->castStateUsing(function (string $state) {
return Curriculum::firstWhere('code', $state)->id;
})
->rules(['required']),
ImportColumn::make('curriculum_id')
->label('Kurikulum')
->requiredMapping()
->castStateUsing(function (string $state) {
return Curriculum::firstWhere('code', $state)->id;
})
->rules(['required']),
3 replies
FFilament
Created by Garadit on 2/21/2024 in #❓┊help
Access value outside Repeater
No description
3 replies
FFilament
Created by Garadit on 7/14/2023 in #❓┊help
Using column value or $state in other column
6 replies