Laravel inserir
DB::table('users')->insert([
'email' => '[email protected]',
'votes' => 0
]);
Helpful Hoopoe
DB::table('users')->insert([
'email' => '[email protected]',
'votes' => 0
]);
DistrictModel::insert([
'code' => $data->code,
'name' => $data->name,
'region_id' => $data->region_id,
'sorting' => $data->sorting,
]);
$affected = DB::table('users')
->where('id', 1)
->update(['votes' => 1]);
DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
$users = DB::table('users')
->whereJsonContains('options->languages', ['en', 'de'])
->get();
$users = DB::table('users')
->whereIn('id', [1, 2, 3])
->get();