Add audit logging.

This commit is contained in:
James Cole
2019-02-08 07:13:59 +01:00
parent f1e83f240e
commit d63c9c9aea
6 changed files with 93 additions and 9 deletions

View File

@@ -67,6 +67,7 @@ class HomeController extends Controller
Log::debug('Received dateRange', ['start' => $request->get('start'), 'end' => $request->get('end'), 'label' => $request->get('label')]);
// check if the label is "everything" or "Custom range" which will betray
// a possible problem with the budgets.
if ($label === (string)trans('firefly.everything') || $label === (string)trans('firefly.customRange')) {
@@ -103,6 +104,8 @@ class HomeController extends Controller
$types = config('firefly.accountTypesByIdentifier.asset');
$count = $repository->count($types);
Log::channel('audit')->info('User visits homepage.');
if (0 === $count) {
return redirect(route('new-user.index'));
}