laravel foreign key constraint memory limit while create record code example
Example: laravel update from query
$affected = DB::table('users')
->where('id', 1)
->update(['votes' => 1]);
$affected = DB::table('users')
->where('id', 1)
->update(['votes' => 1]);