Created
October 6, 2022 17:39
-
-
Save dannetstudio/8bb153a34f374b601e40793b35b8e2d9 to your computer and use it in GitHub Desktop.
setTimeZoneAttribute Mutator
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 | |
| public function setTimeZoneAttribute($value) { | |
| $this->attributes['timezone'] = $value == config('app.timezone') || is_null($value) ? null : $value; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment