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:Jump to solution
Change your fillable in the model to
protected $fillable = ['ipint', 'dnsptr'];
3 Replies