diff --git a/app/Http/Controllers/Bo/Re7Controller.php b/app/Http/Controllers/Bo/Re7Controller.php index 77e9a1e..a1cbc1f 100644 --- a/app/Http/Controllers/Bo/Re7Controller.php +++ b/app/Http/Controllers/Bo/Re7Controller.php @@ -230,7 +230,8 @@ class Re7Controller extends Controller ), $settings->name, $discount, - config('app.url') + config('app.url'), + $settings->company, ))->render()); case 'prize': return response((new PrizeWonMail( @@ -240,7 +241,8 @@ class Re7Controller extends Controller ), $settings->name, $prize, - config('app.url') + config('app.url'), + $settings->company, ))->render()); case 'prize-sent': return response((new PrizeIsSentMail( @@ -248,7 +250,8 @@ class Re7Controller extends Controller $user->email, $user->first_name ), - $settings->name + $settings->name, + $settings->company, ))->render()); case 'proof': return response((new WinningProofSubmitedMail( @@ -256,7 +259,8 @@ class Re7Controller extends Controller $user->email, $user->first_name ), - $settings->name + $settings->name, + $settings->company, ))->render()); default: return response('', 404); diff --git a/app/Mail/Won/DiscountWonMail.php b/app/Mail/Won/DiscountWonMail.php index 5595118..6814da6 100644 --- a/app/Mail/Won/DiscountWonMail.php +++ b/app/Mail/Won/DiscountWonMail.php @@ -3,6 +3,7 @@ namespace App\Mail\Won; use App\Lib\Discount; +use App\Models\Settings; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; @@ -24,6 +25,7 @@ class DiscountWonMail extends Mailable implements ShouldQueue * @param string $game_name The game name. * @param \App\Lib\Discount $discount Amount of the won discount in cents. * @param string $print_url Url to print the discount. + * @param string $company The company name. * * @return void */ @@ -31,9 +33,9 @@ class DiscountWonMail extends Mailable implements ShouldQueue protected Address $recipient, protected string $game_name, protected Discount $discount, - protected string $print_url - ) { - } + protected string $print_url, + protected string $company + ) {} /** * Get the message envelope. @@ -65,7 +67,8 @@ class DiscountWonMail extends Mailable implements ShouldQueue 'first_name' => $this->recipient->name ?? $this->recipient->address, 'game_name' => $this->game_name, 'discount' => $this->discount, - 'print_url' => $this->print_url + 'print_url' => $this->print_url, + 'company' => $this->company, ], ); } diff --git a/app/Mail/Won/PrizeIsSentMail.php b/app/Mail/Won/PrizeIsSentMail.php index a514acf..843bc08 100644 --- a/app/Mail/Won/PrizeIsSentMail.php +++ b/app/Mail/Won/PrizeIsSentMail.php @@ -21,13 +21,14 @@ class PrizeIsSentMail extends Mailable implements ShouldQueue * * @param \Illuminate\Mail\Mailables\Address $recipient The winner that has submited winning proof. * @param string $game_name The game name. + * @param string $company The company name. * @return void */ public function __construct( protected Address $recipient, protected string $game_name, - ) { - } + protected string $company + ) {} /** * Get the message envelope. @@ -56,6 +57,7 @@ class PrizeIsSentMail extends Mailable implements ShouldQueue with: [ 'first_name' => $this->recipient->name ?? $this->recipient->address, 'game_name' => $this->game_name, + 'company' => $this->company, ], ); } diff --git a/app/Mail/Won/PrizeWonMail.php b/app/Mail/Won/PrizeWonMail.php index d0d888d..d09cc56 100644 --- a/app/Mail/Won/PrizeWonMail.php +++ b/app/Mail/Won/PrizeWonMail.php @@ -24,6 +24,7 @@ class PrizeWonMail extends Mailable implements ShouldQueue * @param string $game_name The game name. * @param \App\Models\Prize $prize The won prize. * @param string $print_url Url to print the discount. + * @param string $company The game name. * * @return void */ @@ -31,9 +32,9 @@ class PrizeWonMail extends Mailable implements ShouldQueue protected Address $recipient, protected string $game_name, protected Prize $prize, - protected string $print_url - ) { - } + protected string $print_url, + protected string $company + ) {} /** * Get the message envelope. @@ -64,7 +65,8 @@ class PrizeWonMail extends Mailable implements ShouldQueue with: [ 'first_name' => $this->recipient->name ?? $this->recipient->address, 'game_name' => $this->game_name, - 'prize_label' => $this->prize->label + 'prize_label' => $this->prize->label, + 'company' => $this->company ], ); } diff --git a/app/Mail/Won/WinningProofSubmitedMail.php b/app/Mail/Won/WinningProofSubmitedMail.php index 32b092c..fa324eb 100644 --- a/app/Mail/Won/WinningProofSubmitedMail.php +++ b/app/Mail/Won/WinningProofSubmitedMail.php @@ -21,13 +21,14 @@ class WinningProofSubmitedMail extends Mailable implements ShouldQueue * * @param \Illuminate\Mail\Mailables\Address $recipient The winner that has submited winning proof. * @param string $game_name The game name. + * @param string $company The company name. * @return void */ public function __construct( protected Address $recipient, protected string $game_name, - ) { - } + protected string $company + ) {} /** * Get the message envelope. @@ -56,6 +57,7 @@ class WinningProofSubmitedMail extends Mailable implements ShouldQueue with: [ 'first_name' => $this->recipient->name ?? $this->recipient->address, 'game_name' => $this->game_name, + 'company' => $this->company ], ); } diff --git a/app/Notifications/Customer/HasSubmitedWinProof.php b/app/Notifications/Customer/HasSubmitedWinProof.php index 4a0e97a..92c65ee 100644 --- a/app/Notifications/Customer/HasSubmitedWinProof.php +++ b/app/Notifications/Customer/HasSubmitedWinProof.php @@ -22,8 +22,7 @@ class HasSubmitedWinProof extends Notification implements ShouldQueue */ public function __construct( protected string $first_name - ) { - } + ) {} /** * Get the notification's delivery channels. @@ -52,9 +51,10 @@ class HasSubmitedWinProof extends Notification implements ShouldQueue return (new WinningProofSubmitedMail( new Address( $notifiable->email, - $this->first_name + $this->first_name, ), $settings->name, + $settings->company, )); } } diff --git a/app/Notifications/Customer/HasWonDiscount.php b/app/Notifications/Customer/HasWonDiscount.php index 4418de7..e75f64e 100644 --- a/app/Notifications/Customer/HasWonDiscount.php +++ b/app/Notifications/Customer/HasWonDiscount.php @@ -28,8 +28,7 @@ class HasWonDiscount extends Notification implements ShouldQueue protected LibDiscount $discount, protected Discount $discount_model, protected string $first_name - ) { - } + ) {} /** * Get the notification's delivery channels. @@ -62,7 +61,8 @@ class HasWonDiscount extends Notification implements ShouldQueue ), $settings->name, $this->discount, - $this->discount_model->link + $this->discount_model->link, + $settings->company, )); } } diff --git a/app/Notifications/Customer/HasWonInstantWin.php b/app/Notifications/Customer/HasWonInstantWin.php index 7a48b5a..d563888 100644 --- a/app/Notifications/Customer/HasWonInstantWin.php +++ b/app/Notifications/Customer/HasWonInstantWin.php @@ -58,7 +58,8 @@ class HasWonInstantWin extends Notification implements ShouldQueue ), $settings->name, $this->prize, - config('app.url') + config('app.url'), + $settings->company, )); } } diff --git a/app/Notifications/Customer/PrizeHasBeenSent.php b/app/Notifications/Customer/PrizeHasBeenSent.php index b494880..50e97d3 100644 --- a/app/Notifications/Customer/PrizeHasBeenSent.php +++ b/app/Notifications/Customer/PrizeHasBeenSent.php @@ -39,6 +39,7 @@ class PrizeHasBeenSent extends Notification $notifiable->email ), $settings->name, + $settings->company, )); } } diff --git a/composer.json b/composer.json index 6d4d24d..15a6fd9 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "uwil/gen-game-web", - "version": "3.1.1", + "version": "3.1.2", "type": "project", "description": "Game generator", "support": {