Skip to content

Instantly share code, notes, and snippets.

@ydatech
Created September 25, 2016 13:29
Show Gist options
  • Select an option

  • Save ydatech/d3e752dd8e38dc4d7d52e4e9fbd17c74 to your computer and use it in GitHub Desktop.

Select an option

Save ydatech/d3e752dd8e38dc4d7d52e4e9fbd17c74 to your computer and use it in GitHub Desktop.
Override fields() pada model User
/*
* Override method fields untuk menghilangkan password dari response data
*
*/
public function fields()
{
$fields = parent::fields();
// remove fields that contain sensitive information
unset($fields['password']);
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment