0
I am trying to do an update on Laravel with:
The second line since code was only added to make sure I could pass the date, as it is already being passed through the form, as I could check using dd($request->all())
But when I send the above code it returns:

How is this possible? Since it passes through the form can be checked by dd($request->all()), I manually pass the controler as shown in the first image and continue giving this error, how to proceed?



The field
dat_documentois defined in the respectiveModel?– ThRnk
Yes, you are like: protected $Dates = [ 'dat_document','dat_reply' ];
– Paulo Martins
How was created the
migrationof that input? It appears that no default value has been set for thedat_documentoas well as for thedat_resposta.– ThRnk
But I created it not to be null! It’s like $table->date('dat_document');. The only difference from the other fields in the table is that it has a ->nullable() in front
– Paulo Martins
Try putting in the
Modelthe following,protected $fillable = ['dat_documento'];or if there is already a variablefillable, just add thedat_documentoin it.– ThRnk
I put along with the other variables in the fillable and picked up... But I’m very curious of the explanation for this. I have two more model that this on the protected date and it worked.... But thanks for the help!
– Paulo Martins
Maybe the other
Modelshad theirprotected $datesas->nullable()inmigrations.– ThRnk
Yes, there is, but they are saving and coming out in the report and on the change page. That is, they are saving. Probably the Dates field only works with nullable()...
– Paulo Martins