Jérémy Munsch 2024-01-17 14:57:47 +01:00
parent 382d0d5470
commit 527237d551
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
10 changed files with 21 additions and 15 deletions

View file

@ -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;

View file

@ -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

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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 */