Make some vars longer.

This commit is contained in:
James Cole
2016-03-29 16:10:51 +02:00
parent cb34ff4c83
commit ab4616a3ad
4 changed files with 12 additions and 14 deletions

View File

@@ -21,19 +21,18 @@ class ResendConfirmation extends Event
{ {
use SerializesModels; use SerializesModels;
public $ip; public $ipAddress;
public $user; public $user;
/** /**
* Create a new event instance. * Create a new event instance.
* *
* @param User $user * @param User $user
* * @param string $ipAddress
* @param string $ip
*/ */
public function __construct(User $user, string $ip) public function __construct(User $user, string $ipAddress)
{ {
$this->user = $user; $this->user = $user;
$this->ip = $ip; $this->ipAddress = $ipAddress;
} }
} }

View File

@@ -21,19 +21,18 @@ class UserRegistration extends Event
{ {
use SerializesModels; use SerializesModels;
public $ip; public $ipAddress;
public $user; public $user;
/** /**
* Create a new event instance. * Create a new event instance.
* *
* @param User $user * @param User $user
* * @param string $ipAddress
* @param string $ip
*/ */
public function __construct(User $user, string $ip) public function __construct(User $user, string $ipAddress)
{ {
$this->user = $user; $this->user = $user;
$this->ip = $ip; $this->ip = $ipAddress;
} }
} }

View File

@@ -48,7 +48,7 @@ class SendRegistrationMail
// get the email address // get the email address
$email = $event->user->email; $email = $event->user->email;
$address = route('index'); $address = route('index');
$ipAddress = $event->ip; $ipAddress = $event->ipAddress;
// send email. // send email.
try { try {
Mail::send( Mail::send(

View File

@@ -42,7 +42,7 @@ class UserConfirmation
public function resendConfirmation(ResendConfirmation $event) public function resendConfirmation(ResendConfirmation $event)
{ {
$user = $event->user; $user = $event->user;
$ipAddress = $event->ip; $ipAddress = $event->ipAddress;
$this->doConfirm($user, $ipAddress); $this->doConfirm($user, $ipAddress);
} }
@@ -54,7 +54,7 @@ class UserConfirmation
public function sendConfirmation(UserRegistration $event) public function sendConfirmation(UserRegistration $event)
{ {
$user = $event->user; $user = $event->user;
$ipAddress = $event->ip; $ipAddress = $event->ipAddress;
$this->doConfirm($user, $ipAddress); $this->doConfirm($user, $ipAddress);
} }