Medianet-Tunisia /
laravel-auth-api
| 1 | <?php |
||
| 2 | |||
| 3 | namespace MedianetDev\LaravelAuthApi\Models; |
||
| 4 | |||
| 5 | use Illuminate\Auth\Authenticatable; |
||
| 6 | use Illuminate\Auth\Passwords\CanResetPassword; |
||
| 7 | use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; |
||
| 8 | use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; |
||
| 9 | use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; |
||
| 10 | use Illuminate\Database\Eloquent\Model; |
||
| 11 | use Illuminate\Foundation\Auth\Access\Authorizable; |
||
| 12 | use Illuminate\Notifications\Notifiable; |
||
| 13 | use MedianetDev\LaravelAuthApi\Http\Controllers\Traits\MustVerifyEmail; |
||
| 14 | |||
| 15 | class User extends Model implements |
||
| 16 | AuthenticatableContract, |
||
| 17 | AuthorizableContract, |
||
| 18 | CanResetPasswordContract |
||
| 19 | { |
||
| 20 | use Authenticatable, Authorizable, CanResetPassword, MustVerifyEmail, Notifiable; |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 21 | |||
| 22 | /** |
||
| 23 | * Send the password reset notification. |
||
| 24 | * |
||
| 25 | * @param string $token |
||
| 26 | * @return void |
||
| 27 | */ |
||
| 28 | public function sendPasswordResetNotification($token) |
||
| 29 | { |
||
| 30 | // get the notification template from the config file |
||
| 31 | $passwordTemplate = config('laravel-auth-api.password_notification'); |
||
| 32 | // send the notification |
||
| 33 | $this->notify(new $passwordTemplate($token)); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * social accounts. |
||
| 38 | */ |
||
| 39 | 2 | public function linkedSocialAccounts() |
|
| 40 | { |
||
| 41 | 2 | return $this->hasMany(LinkedSocialAccount::class); |
|
| 42 | } |
||
| 43 | } |
||
| 44 |