Changeset 1c25bcf for app/Notifications


Ignore:
Timestamp:
10/25/21 21:49:53 (3 years ago)
Author:
Berat Kjufliju <kufliju@…>
Branches:
develop, master
Children:
e756bd9
Parents:
05e57e2
Message:

added 2fa, bug fixes, edited blades

File:
1 moved

Legend:

Unmodified
Added
Removed
  • app/Notifications/VerifyUser.php

    r05e57e2 r1c25bcf  
    33namespace App\Notifications;
    44
     5use App\Models\Company;
    56use App\Models\User;
     7use App\Services\Hashid;
    68use Illuminate\Bus\Queueable;
     9use Illuminate\Contracts\Queue\ShouldQueue;
     10use Illuminate\Notifications\Messages\MailMessage;
    711use Illuminate\Notifications\Notification;
    8 use Illuminate\Notifications\Messages\MailMessage;
    912
    10 class VerifyNewEmail extends Notification
     13class VerifyUser extends Notification implements ShouldQueue
    1114{
    1215    use Queueable;
    1316
    14     private $user;
     17    protected $user;
    1518
    1619    /**
     
    2730     * Get the notification's delivery channels.
    2831     *
    29      * @param  mixed $notifiable
     32     * @param mixed $notifiable
    3033     * @return array
    3134     */
     
    3841     * Get the mail representation of the notification.
    3942     *
    40      * @param  mixed $notifiable
     43     * @param mixed $notifiable
    4144     * @return \Illuminate\Notifications\Messages\MailMessage
    4245     */
    4346    public function toMail($notifiable)
    4447    {
     48        $hashId = new Hashid();
     49
    4550        return (new MailMessage)
    46             ->greeting("Hello " . $this->user->name)
    47             ->line("To verify your new email click the button.")
     51            ->greeting("Login verification")
     52            ->line("To verify click the button and enter your security code.")
    4853            ->line("Your security code is: " . $this->user->security_code)
    49             ->action("Verify", url("/auth/verify/" . $this->user->id . "/" . $this->user->verify_token));
     54            ->action("Verify", route("verify-login.index", [
     55                "id" => $hashId->encode($this->user->id),
     56                "token" => $this->user->verify_token
     57            ]));
    5058    }
    5159
     
    5361     * Get the array representation of the notification.
    5462     *
    55      * @param  mixed $notifiable
     63     * @param mixed $notifiable
    5664     * @return array
    5765     */
     
    6270        ];
    6371    }
     72
     73
    6474}
Note: See TracChangeset for help on using the changeset viewer.