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? -

Php - Delimiter must not be alphanumeric or backslash -

Delphi interface implements -