. */ declare(strict_types=1); namespace FireflyIII\Notifications\User; use FireflyIII\Notifications\ReturnsAvailableChannels; use FireflyIII\User; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; /** * Class UserNewPassword */ class UserNewPassword extends Notification { use Queueable; private string $url; public function __construct(string $url) { $this->url = $url; } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function toArray(User $notifiable) { return [ ]; } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function toMail(User $notifiable) { return (new MailMessage()) ->markdown('emails.password', ['url' => $this->url]) ->subject((string) trans('email.reset_pw_subject')); } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function via(User $notifiable) { return ReturnsAvailableChannels::returnChannels('user', $notifiable); } }