fix: undefined variable settingsGlobal on mail
This commit is contained in:
parent
2c1c3eb2e6
commit
8b6943df28
10 changed files with 39 additions and 24 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ class HasWonInstantWin extends Notification implements ShouldQueue
|
|||
),
|
||||
$settings->name,
|
||||
$this->prize,
|
||||
config('app.url')
|
||||
config('app.url'),
|
||||
$settings->company,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class PrizeHasBeenSent extends Notification
|
|||
$notifiable->email
|
||||
),
|
||||
$settings->name,
|
||||
$settings->company,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "uwil/gen-game-web",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"type": "project",
|
||||
"description": "Game generator",
|
||||
"support": {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue