F
Filamentβ€’7mo ago
jakeb

Data Submitted with forms not making it into SQL Query

https://gist.github.com/jakeb91/3e11af7000c3b312c50eb1900b3bd618 I have a form where I am submitting two fields: ipint dnsptr When the data is submitted from a 'Create' form, the resulting SQL insert is just INSERT INTO ipv4dnsptr () VALUES () regardless of what has been entered into the ipint and dnsptr fields in the form. Manually inserting a record via SQL and trying to edit it via the Form also results in the submitted data not being saved / not updating the record. Listing the manually inserted records in a table is working as expected.
Gist
Data Submitted with forms not making it into SQL Query
Data Submitted with forms not making it into SQL Query - CreateIpv4dnsptr.php
Solution:
Change your fillable in the model to protected $fillable = ['ipint', 'dnsptr'];
Jump to solution
3 Replies
Solution
Blackpig
Blackpigβ€’7mo ago
Change your fillable in the model to protected $fillable = ['ipint', 'dnsptr'];
jakeb
jakebOPβ€’7mo ago
fuck am i an idiot... clearly I had one of those days - thanks for pointing that out :upsidedown_cry:
Blackpig
Blackpigβ€’7mo ago
Easily done πŸ‘πŸ»
Want results from more Discord servers?
Add your server