php - Laravel : UPDATE if exist else INSERT? -


my question written in title! exist method in laravel (eloquent, fluent...) wich update row , if row doesn't exist inserted ? guys

dunno id laravel has such method, mysql can query this

insert t set c1='foo', c2='bar' on duplicate key update c2='bar' 

you have have unique index on table make trick work


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -