Answers for "db table update laravel"

PHP
12

update column value laravel

Page::where('id', $id)->update(array('image' => 'asdasd'));
Posted by: Guest on May-07-2020
10

laravel update from query

$affected = DB::table('users')
              ->where('id', 1)
              ->update(['votes' => 1]);
Posted by: Guest on May-07-2020
7

laravel wher in

$users = DB::table('users')
                    ->whereIn('id', [1, 2, 3])
                    ->get();
Posted by: Guest on April-30-2020
0

laravel db::query update

DB::table('user')->where('email', $userEmail)->update(array('member_type' => $plan));
Posted by: Guest on November-19-2020
3

update column value laravel

$page = Page::find($id);

// Make sure you've got the Page model
if($page) {
    $page->image = 'imagepath';
    $page->save();
}
Posted by: Guest on May-07-2020
1

DB::table('users')->get();

DB::select('SELECT * FROM users WHERE name = "'.Input::get('name').'"');
Posted by: Guest on October-22-2020

Browse Popular Code Answers by Language