DEV Community

Discussion on: Laravel 5.6 - User Activation with Signed Routes & Notifications

Collapse
 
mohammedmohammedbayomy profile image
Mohammed Bayomy

I Think That Now You're Using Another Table Not The users Table , Cuz user() function Will Work Only To Check Any Values In The users Table
So You Should Send What You'll Need In The Method Of toMail(){ .... }

Like

$url = URL::temporarySignedRoute('activate-email', now()->addMinutes(60), [
'register' => $this->register->id,
'status'=> $this->register->status,
'role_id' =>$this->register->role_id,
'email' =>$this->register->email,
]);
return (new MailMessage)
->line('Please Verify Your Email Address')
->action('Activate Email', $url)
->line('Thank you for using our application!');

And To Check The Value In The active Route Or In The Middleware You Type It Easily

Like Now I Want To Change The Value Of Status When User Click In The Link Inside The Sent Email

$request->register->update([
'status' => 1
]);

Hope It Help Somebody

_^