mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Allow null for logCheckin $action_date
This commit is contained in:
parent
239f21b0d7
commit
26c0cf5d33
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in a new issue