Update

Method 1

$data = MODEL_NAME::find( ... PrimaryKeyID  ....); // select a row
$data->coulmn_name = 'new value';    
$data->coulmn_name = 'new value';    
$data->coulmn_name = 'new value';    
................................
................................
$data->save();

By this way can only select a row by find() method. You can't select row by other selecting methods


Method 2

MODEL_NAME:: find() or where() or first() or [ other selecting method ]  // select a row
      ->update([
          'column_name' => 'new value',
          'column_name' => 'new value',
          ............................
          ............................
      ]);

results matching ""

    No results matching ""