Skip to content

Instantly share code, notes, and snippets.

@devmsh
Created December 19, 2018 08:56
Show Gist options
  • Select an option

  • Save devmsh/248cd891b387bd8f0ea344d2731b940f to your computer and use it in GitHub Desktop.

Select an option

Save devmsh/248cd891b387bd8f0ea344d2731b940f to your computer and use it in GitHub Desktop.
User.php
<?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