GCTC-NTGC /
TalentCloud
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace App\Notifications; |
||||
| 4 | |||||
| 5 | use Illuminate\Bus\Queueable; |
||||
| 6 | use Illuminate\Notifications\Notification; |
||||
| 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
||||
| 8 | use Illuminate\Notifications\Messages\MailMessage; |
||||
| 9 | use Illuminate\Support\Facades\Lang; |
||||
| 10 | |||||
| 11 | class ResetPasswordNotification extends Notification implements ShouldQueue |
||||
| 12 | { |
||||
| 13 | use Queueable; |
||||
| 14 | |||||
| 15 | /** |
||||
| 16 | * The number of times the job may be attempted. |
||||
| 17 | * |
||||
| 18 | * @var integer |
||||
| 19 | */ |
||||
| 20 | public $tries = 5; |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * The password reset token. |
||||
| 24 | * |
||||
| 25 | * @var string |
||||
| 26 | */ |
||||
| 27 | public $token; |
||||
| 28 | |||||
| 29 | /** |
||||
| 30 | * Create a notification instance. |
||||
| 31 | * |
||||
| 32 | * @param string $token |
||||
| 33 | * @return void |
||||
| 34 | */ |
||||
| 35 | public function __construct($token) |
||||
| 36 | { |
||||
| 37 | $this->token = $token; |
||||
| 38 | } |
||||
| 39 | |||||
| 40 | /** |
||||
| 41 | * Get the notification's delivery channels. |
||||
| 42 | * |
||||
| 43 | * @param mixed $notifiable |
||||
| 44 | * @return array |
||||
| 45 | */ |
||||
| 46 | public function via($notifiable) |
||||
| 47 | { |
||||
| 48 | return ['mail']; |
||||
| 49 | } |
||||
| 50 | |||||
| 51 | /** |
||||
| 52 | * Get the mail representation of the notification. |
||||
| 53 | * |
||||
| 54 | * @param mixed $notifiable |
||||
| 55 | * @return \Illuminate\Notifications\Messages\MailMessage |
||||
| 56 | */ |
||||
| 57 | public function toMail($notifiable) |
||||
| 58 | { |
||||
| 59 | return (new MailMessage) |
||||
| 60 | ->subject(Lang::get('common/notifications/password_reset.subject')) |
||||
| 61 | ->greeting(Lang::get('common/notifications/password_reset.greeting')) |
||||
| 62 | ->line(Lang::get('common/notifications/password_reset.line_1')) |
||||
| 63 | ->action(Lang::get('common/notifications/password_reset.action'), url(route('password.reset', $this->token, false))) |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
The function
url was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 64 | ->line(Lang::get('common/notifications/password_reset.line_2')) |
||||
| 65 | ->salutation(Lang::get('common/notifications/password_reset.salutation', ['name' => config('mail.from.name')])); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 66 | } |
||||
| 67 | } |
||||
| 68 |