Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29935

compatible with Illuminate\Foundation\Auth\User::sendEmailVerificationNotification()

$
0
0

I need to change default resetpassword message so i make my own ResetPassword notification and when i do that I got this Error Declaration of App\User::sendEmailVerificationNotification($token) should be compatible with Illuminate\Foundation\Auth\User::sendEmailVerificationNotification()

code in User model:

<?php

namespace App;

use App\admin\Course;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable implements MustVerifyEmail
{
    use Notifiable; // حتى اقدر ارسل اله اشعار

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password','type','mobile',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];

     public function courses()
    {
        return $this->belongsToMany(Course::class, 'course_user', 'user_id', 'course_id');
    }

    public function routeNotificationForNexmo($notification)
    {
        return $this->mobile;
    }

    public function sendPasswordResetNotification($token)
        {

        $this->notify(new \App\Notifications\ResetPassword($token));

    }

    public function sendEmailVerificationNotification($token)
        {

        $this->notify(new \App\Notifications\VerifyEmail($token));

    }    
}

Why !!

Viewing all articles
Browse latest Browse all 29935

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>