Answers for "syntax updateorinsert all item in laravel 7"

PHP
0

how to update all row in laravel

DB::table('table')->update(['column' => 1]);

Model::query()->update(['confirmed' => 1]);
Posted by: Guest on February-07-2021
-2

laravel updateOrInsert

DB::table('users')
    ->updateOrInsert(
        ['email' => '[email protected]', 'name' => 'John'],
        ['votes' => '2']
    );
Posted by: Guest on January-20-2021

Browse Popular Code Answers by Language