Skip to content
Advertisement

Insert a value at a NOT NULL column int in SQL Laravel Eloquent

JavaScript

1

I need to have this eloquent inserting data into my table with my first two columns, id, category_id be added with auto increment, specifically, the highest value + 1.

my code above has the error:

JavaScript

what can I at the “max()” for this to function as intended? any help would be appreciated thanks.

Advertisement

Answer

you have error in

JavaScript

I think you need

JavaScript

then

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement