Upgrade to Laravel 9 (#4413)

Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
Matthew Penner 2022-10-14 10:59:20 -06:00 committed by GitHub
parent 95e15d2c8a
commit cbcf62086f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
573 changed files with 4387 additions and 9411 deletions

View file

@ -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 . '!')