A
A
Anton2018-11-05 21:37:40
Laravel
Anton, 2018-11-05 21:37:40

How to save a model with a default value?

Hello. There is a table in the database, in the table there is a field for which the default value is set, then there is a form, if you do not fill in the corresponding field in the model, it will be null, after saving it gives an error that it cannot be saved null. How to win it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question