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