F
Filament6mo ago
w5m

Setting model attribute based on form field value

If I create a private my_people_count variable in my Example model and a peopleCount() method (return type of Attribute) which gets & sets the private variable. If I also include in my ExampleResource class the following form component: TextInput::make('people_count'), ...what else do I need to do to cause Filament to call the attribute setter when processing the submitted form? (I forgot to point out that the count will not be saved to the underlying database table - it will only be used to indicate how many related model instances to create)
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server