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

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

Delphi interface implements -

Php - Delimiter must not be alphanumeric or backslash -