I get the error above when I am trying to pass a foreign key to main table using a hidden field in the form. This is the line I added:
<input type="hidden" value="{{ category_id }}">
I also tried to do:
<input type="hidden" value="{{ $assortments->category_id }}">
since category_id
is a foreign key of that table. Does anybody know how I can solve this problem?
I already tried looking in the Laravel documentation and I read other StackOverflow questions about this subject but their answers did not help me out.
category_id
is a column in the assortments
table. I am trying to pass that id. It is not a variable.category_id
is a foreign key.
I also wrote it like this:
<input type="hidden" value="{{ $category_id }}">
Which gives the following error:
Undefined variable: category_id