Skip to content

Commit

Permalink
Merge pull request #26 from mohamedsabil83/patch-1
Browse files Browse the repository at this point in the history
Fix issue of TypeError method_exists()
  • Loading branch information
khanzadimahdi authored Jul 16, 2021
2 parents e3ba504 + f66b6dc commit fce320d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function visit(Model $model = null)
unset($data['request']);
}

if (method_exists($model, 'visitLogs')) {
if (null !== $model && method_exists($model, 'visitLogs')) {
$visit = $model->visitLogs()->create($data);
} else {
$visit = Visit::create($data);
Expand Down

0 comments on commit fce320d

Please sign in to comment.