Check for Auth::user before trying to log id (for cli)
This commit is contained in:
parent
b999c50a2e
commit
f1a6308002
1 changed files with 3 additions and 1 deletions
|
@ -144,7 +144,9 @@ trait Loggable
|
||||||
|
|
||||||
$log->location_id = null;
|
$log->location_id = null;
|
||||||
$log->note = $note;
|
$log->note = $note;
|
||||||
$log->user_id = Auth::user()->id;
|
if(Auth::user())
|
||||||
|
$log->user_id = Auth::user()->id;
|
||||||
|
|
||||||
$log->logaction('checkin from');
|
$log->logaction('checkin from');
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
|
|
Loading…
Add table
Reference in a new issue