Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -12,50 +12,25 @@ class AccountCreated extends Notification implements ShouldQueue
|
|||
{
|
||||
use Queueable;
|
||||
|
||||
/**
|
||||
* The authentication token to be used for the user to set their
|
||||
* password for the first time.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
public $token;
|
||||
|
||||
/**
|
||||
* The user model for the created user.
|
||||
*
|
||||
* @var \Pterodactyl\Models\User
|
||||
*/
|
||||
public $user;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*/
|
||||
public function __construct(User $user, string $token = null)
|
||||
public function __construct(public User $user, public ?string $token = null)
|
||||
{
|
||||
$this->token = $token;
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
public function via(): array
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
*
|
||||
* @return \Illuminate\Notifications\Messages\MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$message = (new MailMessage())
|
||||
->greeting('Hello ' . $this->user->name . '!')
|
||||
|
|
Reference in a new issue