In Laravel 5.1, for MySQL insert, I want to see if the record already exists and update on duplicate or create new if none exists.
I have already searched SO where t
To use laravel function updateOrCreate you need auto increment id in your table.
what they are doing is
select id from your_table where your_attributes
after that get auto increment id
then
update your_table set your_values where field_id