Last active
September 25, 2016 13:29
-
-
Save ydatech/77dbafb29d3f17d5f8e6f4f4e5cb41d0 to your computer and use it in GitHub Desktop.
Override fields() pada model User
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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