Created
September 25, 2016 13:29
-
-
Save ydatech/d3e752dd8e38dc4d7d52e4e9fbd17c74 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
| /* | |
| * 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