Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save ydatech/77dbafb29d3f17d5f8e6f4f4e5cb41d0 to your computer and use it in GitHub Desktop.
Override fields() pada model User
<?php
/*
* 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