Best way to create a virtual/fake input?
I have the following fields:
The
parent_id
only comes up when has_parent
has been selected as a value in the type_fake
select.
So the first select should not be inserted/filled into the Model. Is there a way to define a field is a fake/virtual field which should not be saved in the eloquent model? So I can avoid the SQLSTATE[42S22]: Column not found: 1054 Unknown column 'type_fake' in 'field list'
error.2 Replies
->dehydrated(false)
Perfect, that does the job. Thanks :). I knew there would be a better way than stripping it of before filling π