Created
December 19, 2018 08:56
-
-
Save devmsh/248cd891b387bd8f0ea344d2731b940f to your computer and use it in GitHub Desktop.
User.php
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 | |
| class User{ | |
| public function addNewMobile($mobile): UserMobile | |
| { | |
| event(new MobileVerifying($mobile)); | |
| $userMobile = $this->mobiles()->create(['mobile' => $mobile, 'status' => self::STATUS_VERIFIED]); | |
| event(new MobileVerified($userMobile)); | |
| return $userMobile; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment