snipe-it/app/Events/CheckoutableCheckedIn.php

33 lines
852 B
PHP
Raw Normal View History

2018-07-21 05:00:17 -07:00
<?php
namespace App\Events;
use App\Models\User;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class CheckoutableCheckedIn
2018-07-21 05:00:17 -07:00
{
use Dispatchable, SerializesModels;
public $checkoutable;
2018-07-21 05:00:17 -07:00
public $checkedOutTo;
public $checkedInBy;
public $note;
public $action_date; // Date setted in the hardware.checkin view at the checkin_at input, for the action log
2018-07-21 05:00:17 -07:00
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($checkoutable, $checkedOutTo, User $checkedInBy, $note, $action_date = null)
2018-07-21 05:00:17 -07:00
{
$this->checkoutable = $checkoutable;
2018-07-21 05:00:17 -07:00
$this->checkedOutTo = $checkedOutTo;
$this->checkedInBy = $checkedInBy;
$this->note = $note;
$this->action_date = $action_date ?? date('Y-m-d');
2018-07-21 05:00:17 -07:00
}
}