Attemp to fix notifications
https://ldc-services-web.sentry.io/issues/4806040997/?environment=production&project=4506512363159552&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d&stream_index=0
This commit is contained in:
parent
382d0d5470
commit
527237d551
10 changed files with 21 additions and 15 deletions
|
|
@ -32,6 +32,7 @@ class DestroyCustomer extends Notification
|
|||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
/** @var string $first_name */
|
||||
$first_name = $notifiable->api_data->firstname;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,10 +30,12 @@ class DestroyedCustomer extends Notification
|
|||
*/
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
// phpcs:enable
|
||||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
|
||||
// phpcs:enable
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
|
||||
return (new MailMessage())
|
||||
->subject(trans('Votre compte est suprimé - :site_name', [
|
||||
'site_name' => $settings->name
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Notifications\Customer;
|
||||
|
||||
use App\Mail\Won\WinningProofSubmitedMail;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Settings;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Mail\Mailable;
|
||||
|
|
@ -42,13 +41,14 @@ class HasSubmitedWinProof extends Notification implements ShouldQueue
|
|||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param \App\Models\Customer $notifiable
|
||||
* @param object $notifiable
|
||||
* @return \Illuminate\Contracts\Mail\Mailable
|
||||
*/
|
||||
public function toMail(Customer $notifiable): Mailable
|
||||
public function toMail(object $notifiable): Mailable
|
||||
{
|
||||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
return (new WinningProofSubmitedMail(
|
||||
new Address(
|
||||
$notifiable->email,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ namespace App\Notifications\Customer;
|
|||
|
||||
use App\Lib\Discount as LibDiscount;
|
||||
use App\Mail\Won\DiscountWonMail;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Discount;
|
||||
use App\Models\Settings;
|
||||
use Illuminate\Bus\Queueable;
|
||||
|
|
@ -48,13 +47,14 @@ class HasWonDiscount extends Notification implements ShouldQueue
|
|||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param \App\Models\Customer $notifiable
|
||||
* @param object $notifiable
|
||||
* @return \Illuminate\Contracts\Mail\Mailable
|
||||
*/
|
||||
public function toMail(Customer $notifiable): Mailable
|
||||
public function toMail(object $notifiable): Mailable
|
||||
{
|
||||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
return (new DiscountWonMail(
|
||||
new Address(
|
||||
$notifiable->email,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Notifications\Customer;
|
||||
|
||||
use App\Mail\Won\PrizeWonMail;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Prize;
|
||||
use App\Models\Settings;
|
||||
use Illuminate\Bus\Queueable;
|
||||
|
|
@ -25,6 +24,7 @@ class HasWonInstantWin extends Notification implements ShouldQueue
|
|||
*/
|
||||
public function __construct(protected Prize $prize, protected string $first_name)
|
||||
{
|
||||
$this->prize = $prize->withoutRelations();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -43,13 +43,14 @@ class HasWonInstantWin extends Notification implements ShouldQueue
|
|||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param \App\Models\Customer $notifiable
|
||||
* @param object $notifiable
|
||||
* @return \Illuminate\Contracts\Mail\Mailable
|
||||
*/
|
||||
public function toMail(Customer $notifiable): Mailable
|
||||
public function toMail(object $notifiable): Mailable
|
||||
{
|
||||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
return (new PrizeWonMail(
|
||||
new Address(
|
||||
$notifiable->email,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace App\Notifications\Customer;
|
||||
|
||||
use App\Mail\Won\PrizeIsSentMail;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Settings;
|
||||
use Illuminate\Contracts\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Address;
|
||||
|
|
@ -27,13 +26,14 @@ class PrizeHasBeenSent extends Notification
|
|||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param \App\Models\Customer $notifiable
|
||||
* @param object $notifiable
|
||||
* @return \Illuminate\Contracts\Mail\Mailable
|
||||
*/
|
||||
public function toMail(Customer $notifiable): Mailable
|
||||
public function toMail(object $notifiable): Mailable
|
||||
{
|
||||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
return (new PrizeIsSentMail(
|
||||
new Address(
|
||||
$notifiable->email
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class ResetPassword extends NotificationsResetPassword
|
|||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
|
||||
/** @var \App\Models\Customer\Customer $notifiable */
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
$resetUrl = $this->resetUrl($notifiable);
|
||||
/** @var string $first_name */
|
||||
$first_name = $notifiable->api_data->firstname;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class UpdateEmail extends Notification
|
|||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
/** @var string $first_name */
|
||||
$first_name = $notifiable->api_data->firstname;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class UpdatePassword extends Notification
|
|||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
/** @var string $first_name */
|
||||
$first_name = $notifiable->api_data->firstname;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class VerifyEmail extends NotificationsVerifyEmail
|
|||
/** @var \App\Models\Settings */
|
||||
$settings = app(Settings::class);
|
||||
|
||||
/** @var \App\Models\Customer\Customer $notifiable */
|
||||
/** @var \App\Models\Customer $notifiable */
|
||||
/** @var string $verificationUrl */
|
||||
$verificationUrl = $this->verificationUrl($notifiable);
|
||||
/** @var string $first_name */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue