Garadit
Garadit
FFilament
Created by ocram82 on 4/12/2024 in #❓┊help
Assign role after registration
My bad, I forgot to add a model. I'll probably open a new thread related to this.
94 replies
FFilament
Created by ocram82 on 4/12/2024 in #❓┊help
Assign role after registration
I want to use a fieldset to handle the hasOne relation 'userDetail'. Referring to the latest release, I thought this would be supported by default since $this->form->model($user)->saveRelationships(); is there by default now. But it doesn't work in my case. I don't know if I did it right or not. Someone has asked this kind of question before, but with another version and it is not compatible with the latest version. https://discord.com/channels/883083792112300104/1222497096817447022 Here's the full code I wrote for the custom Regiter.php, wondering what went wrong: https://gist.github.com/TegarAditya/d236edbbf94fd3a8b7fffb5aeedff43d So I will probably use handleRegistration for this. But is that a good idea or a bad practice?
94 replies
FFilament
Created by ocram82 on 4/12/2024 in #❓┊help
Assign role after registration
No description
94 replies
FFilament
Created by ocram82 on 4/12/2024 in #❓┊help
Assign role after registration
Sorry in advance, is this method possible for hasOne relationships? I used fieldset, but after trying it, the relationship data is not saved. Can we save the main data with handleRegistration and then the relationship data afterwards?
94 replies
FFilament
Created by Garadit on 4/4/2024 in #❓┊help
Is it possible to implement HasOne relationship in Registration page?
Thank you very much, the error is gone now ✨
5 replies
FFilament
Created by Garadit on 4/4/2024 in #❓┊help
Is it possible to implement HasOne relationship in Registration page?
Sorry, I can't use fieldset on my CustomRegisterPage. It throws an error "Call to a member function userDetail() on null", I guess because it cannot load the user model. This is the flare debug query form: SELECT * FROM sessions WHERE id = 0dOyTEsseUdHmuiqcxDYjJOekQMFSE3dzKquHkj9 limit 1 Or maybe I missed something.
5 replies
FFilament
Created by Garadit on 3/15/2024 in #❓┊help
Importer causing server restart
This is the Importer code
3 replies
FFilament
Created by Garadit on 2/21/2024 in #❓┊help
Access value outside Repeater
3 replies
FFilament
Created by Garadit on 2/21/2024 in #❓┊help
Access value outside Repeater
Here is the code
3 replies
FFilament
Created by Darpan on 4/10/2023 in #❓┊help
How to prevent already selected value in repeater?
This is working very well, thank you
13 replies
FFilament
Created by Darpan on 4/10/2023 in #❓┊help
How to prevent already selected value in repeater?
Make sense now
13 replies
FFilament
Created by Darpan on 4/10/2023 in #❓┊help
How to prevent already selected value in repeater?
I just want it to work like multiselect, which doesn't show the selection when it's already selected in another repeater. If using rules, won't it check it after the form is submitted (clicked submit)?
13 replies
FFilament
Created by Darpan on 4/10/2023 in #❓┊help
How to prevent already selected value in repeater?
Has the problem been resolved? I'm a bit lost on how to do that for Select Columns
13 replies
FFilament
Created by Garadit on 7/14/2023 in #❓┊help
Using column value or $state in other column
Works very well by adding first(). Thank You.
Tables\Columns\TextColumn::make('difference')
->label('Difference')
->getStateUsing(function ($record) {
return $record->respondent_count - $record->population->first()->sample_size;;
})
->sortable(),
Tables\Columns\TextColumn::make('difference')
->label('Difference')
->getStateUsing(function ($record) {
return $record->respondent_count - $record->population->first()->sample_size;;
})
->sortable(),
6 replies
FFilament
Created by Garadit on 7/14/2023 in #❓┊help
Using column value or $state in other column
Yes, that's it
6 replies
FFilament
Created by Garadit on 7/14/2023 in #❓┊help
Using column value or $state in other column
hasMany
6 replies