simplified checkout event handling per @uberbrady’s suggestion

This generalizes the checkout events into the CheckoutableCheckedOut and CheckoutableCheckedIn events.
This commit is contained in:
Till Deeke
2018-09-10 16:40:26 +02:00
parent 62195a805a
commit 007e8fbdf9
23 changed files with 229 additions and 618 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Events;
use App\Models\User;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class CheckoutableCheckedIn
{
use Dispatchable, SerializesModels;
public $checkoutable;
public $checkedOutTo;
public $checkedInBy;
public $note;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($checkoutable, $checkedOutTo, User $checkedInBy, $note)
{
$this->checkoutable = $checkoutable;
$this->checkedOutTo = $checkedOutTo;
$this->checkedInBy = $checkedInBy;
$this->note = $note;
}
}