Laravel Pagination and relations

I have this eloquent query:

return Post::search($this->search)
                      ->query(function ($query) {
                           $query->with('post_categories');
                       })->paginate(10)
                          ->appends('query', null);

it has always worked, but but suddenly stopped to works. Return always total 0 and bootstrap pagination not show.

can someone help me?

Thank you, Cloude