My controller code is like this :
public function store(CreateUserRequest $request) { $input = $request->all(); $user = $this->userRepository->
You should call the route() function as:
route('users.index.year', ['year' => $year])