Error in pagination after upgrading laravel to 5.4 from 5.2

public function listdata() {  $  locale = Input::get('locale'); $  pageSize = intval(Input::get('pageSize')); $  currentPage = intval(Input::get('currentPage')); $  column = Input::get('column'); $  sort_type = Input::get('sort_type');  $  search_key = Input::get('search_key');  $  default_locale = Config('config.default_locale');  Paginator::currentPageResolver(function () use ($  currentPage) {     return $  currentPage; });  $  var = User::orderBy($  column, $  sort_type)->paginate($  pageSize);  ...further code 

I was using this in laravel 5.2 and it was working fine. But after upgrading to laravel 5.4 I am getting the error in pagination everywhere in my project.

(1/1) BindingResolutionException Unresolvable dependency resolving [Parameter #0 [ <required> $  items ]] in  class Illuminate\Pagination\LengthAwarePaginator 

I have seen many answers related to this problem but nothing helps me. Any help is appreciated and please don’t write any link because I have already tried many.