update
parent
502aa4d797
commit
f60e6ca6fc
|
|
@ -37,19 +37,19 @@ if (!function_exists('logActivity')) {
|
||||||
*/
|
*/
|
||||||
function logActivity($request, $note)
|
function logActivity($request, $note)
|
||||||
{
|
{
|
||||||
$repository = app(\App\Models\Log::class);
|
// $repository = app(\App\Models\Log::class);
|
||||||
$data = [
|
// $data = [
|
||||||
'module' => $request->route()->getAction('prefix'),
|
// 'module' => $request->route()->getAction('prefix'),
|
||||||
'task' => taskLabel($request->route()->getActionMethod()),
|
// 'task' => taskLabel($request->route()->getActionMethod()),
|
||||||
'user_id' => session('uid'),
|
// 'user_id' => session('uid'),
|
||||||
'ipaddress' => $request->getClientIp(),
|
// 'ipaddress' => $request->getClientIp(),
|
||||||
'useragent' => $request->header('User-Agent'),
|
// 'useragent' => $request->header('User-Agent'),
|
||||||
'note' => $note,
|
// 'note' => $note,
|
||||||
'created_at' => \Carbon\Carbon::now()
|
// 'created_at' => \Carbon\Carbon::now()
|
||||||
];
|
// ];
|
||||||
|
|
||||||
if (session('superuser') == false)
|
// if (session('superuser') == false)
|
||||||
$repository->create($data);
|
// $repository->create($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue