I'm using Laravel 5.3 and I'm working now on the reset password option on my CRM.

my CRM is multi-language therefore I need to change the email template / the view that sent to the customer based on his language, actually, I just need to change from RTL to LTR - this value is set on a cookie that called "user\_direction".

I'm using the Laravel default bootstrap auth that includes ResetPassword class.

this is what is have now:

```
<?php

namespace Illuminate\Auth\Notifications;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;

class ResetPassword extends Notification
{
    public $token;

    public function __construct($token)
    {
        $this->token = $token;
    }

    public function via($notifiable)
    {
        return ['mail'];
    }

    public function toMail($notifiable)
    {
        $url        = url('password/reset',$this->token);
        $subject    = trans('global.reset_password_email_subject'); 
        $greeting   = trans('global.reset_password_email_greeting'); 
        $line_01    = trans('global.reset_password_email_line_01'); 
        $action     = trans('global.reset_password_email_action'); 
        $line_02    = trans('global.reset_password_email_line_02'); 

        return (new MailMessage)
            ->subject($subject)
            ->greeting($greeting)
            ->line($line_01)
            ->action($action, $url)
            ->line($line_02);
    }
}

```

and this is the idea of what i want to have but i dont know how to write it right:

```
    public function toMail($notifiable)
    {
        $url        = url('password/reset',$this->token);
        $subject    = trans('global.reset_password_email_subject'); 
        $greeting   = trans('global.reset_password_email_greeting'); 
        $line_01    = trans('global.reset_password_email_line_01'); 
        $action     = trans('global.reset_password_email_action'); 
        $line_02    = trans('global.reset_password_email_line_02'); 

        $view = "notifications::email";
        if($request->cookie('user_direction') == "rtl"):
            $view = "notifications::email-rtl";
        endif;

        return (new MailMessage)
            ->view($view)
            ->subject($subject)
            ->greeting($greeting)
            ->line($line_01)
            ->action($action, $url)
            ->line($line_02);
    }

```

thank you for your help!