T
T
tvsjke2018-03-10 19:03:39
Laravel
tvsjke, 2018-03-10 19:03:39

How to solve the problem with saving json field?

Structure:
5aa40067922b1058296174.png
Method with an error in Models\Product.php
5aa400bc41e27796657191.png
The error itself:
5aa40105c58a3970818198.png
The problem is with the attributes field, if you comment it out, everything is ok.
But at the same time, even if you set it to 1, for example, you still get the same error ...
Moreover, if you put this method in the controller, then everything works
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nioterzor, 2018-03-10
@tvsjke

attributes is used by laravel itself, change the field name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question