Allow null for logCheckin $action_date

This commit is contained in:
snipe 2019-03-14 01:22:29 -07:00
parent 239f21b0d7
commit 26c0cf5d33

View file

@ -81,7 +81,7 @@ trait Loggable
* @since [v3.4]
* @return \App\Models\Actionlog
*/
public function logCheckin($target, $note, $action_date)
public function logCheckin($target, $note, $action_date = null)
{
$log = new Actionlog;
$log->target_type = get_class($target);
@ -106,7 +106,12 @@ trait Loggable
$log->location_id = null;
$log->note = $note;
$log->action_date = $action_date;
if (!$log->action_date) {
$log->action_date = date('Y-m-d H:i:s');
}
$log->user_id = Auth::user()->id;
$log->logaction('checkin from');