Skip to content

Instantly share code, notes, and snippets.

@sirawitpra
Created March 29, 2018 08:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sirawitpra/bc73fa89a59cd7fddea18c7fa1bf49d8 to your computer and use it in GitHub Desktop.
Save sirawitpra/bc73fa89a59cd7fddea18c7fa1bf49d8 to your computer and use it in GitHub Desktop.
<?php
class CustomerAddress extends Model {
protected function setKeysForSaveQuery(Builder $query)
{
$query
->where('Customer_No', '=', $this->getAttribute('Customer_No'))
->where('Address_Name', '=', $this->getAttribute('Address_Name'));
return $query;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment