28 lines
485 B
PHP
28 lines
485 B
PHP
|
<?php
|
||
|
|
||
|
namespace App;
|
||
|
|
||
|
use App\Notifications\SendMailChange;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class ChangeEmail extends Model
|
||
|
{
|
||
|
|
||
|
protected $table = 'change_user_email';
|
||
|
|
||
|
/**
|
||
|
* The attributes that are mass assignable.
|
||
|
*
|
||
|
* @var array
|
||
|
*/
|
||
|
protected $fillable = [
|
||
|
'user_id', 'email', 'token'
|
||
|
];
|
||
|
|
||
|
public function sendMail() {
|
||
|
$user = User::findOrFail($this->user_id);
|
||
|
$user->notify(new SendMailChange($this));
|
||
|
}
|
||
|
|
||
|
}
|