Cannot create new Staff for StaffResource.

Staff model belongs to User. When creating a staff there are 5 inputs: name, position, email, phone_no, and ic_no. Only 'position' is from the 'staffs' table, the others are from the 'users' table. I just added the 'position' field into the StaffResource and it says the field 'position' doesnt have a default value
6 Replies
wyChoong
wyChoong16mo ago
Please read the error message and also understand how filament works. If your issue is from form create/save, check on form schema, not table columns
black ka1ser
black ka1ser16mo ago
my bad
black ka1ser
black ka1ser16mo ago
black ka1ser
black ka1ser16mo ago
when i want to edit/ insert the position @ jawatan, it shows saved but nothing shows up. it is not saved in the db either. however it is alrdy fillable
black ka1ser
black ka1ser16mo ago
i think it has something to do with relationships ?
wyChoong
wyChoong16mo ago
$fillable
Want results from more Discord servers?
Add your server
More Posts