Garadit
Garadit
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