mardi 20 juillet 2021

Cannot sava data in database in notification file in Laravel

I'm using Laravel Notification and i want to save data in my database table if i write my insert query then i'm getting following error otherwise Notification are running :

TypeError: Return value of App\User::getLogNameToUse() must be of the type string, null

This is the query

public function toMail($notifiable)
    {   
        $users = User::find($notifiable->id);
        $users->verification_link=$link;  
        $users->save();
        ...
        ...
     }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire