method() != 'GET'){ $input = $request->all(); $operationLog = new OperationLog(); $operationLog->user_id = $user_id; $operationLog->method = $request->method(); $operationLog->action = $request->path(); $operationLog->data = json_encode($input); $operationLog->ip = $request->ip(); $operationLog->created_at = date('Y-m-d H:i:s',time()); $operationLog->save(); } return $next($request); } }