Set null option for $action_date

This commit is contained in:
snipe 2019-03-14 01:09:16 -07:00
parent 0b927623e8
commit 239f21b0d7

View file

@ -24,7 +24,7 @@ trait Loggable
* @since [v3.4]
* @return \App\Models\Actionlog
*/
public function logCheckout($note, $target, $action_date)
public function logCheckout($note, $target, $action_date = null)
{
$log = new Actionlog;
$log = $this->determineLogItemType($log);
@ -50,6 +50,11 @@ trait Loggable
$log->note = $note;
$log->action_date = $action_date;
if (!$log->action_date) {
$log->action_date = date('Y-m-d H:i:s');
}
$log->logaction('checkout');
return $log;