Support the ongoing development of →
Architecture Blade
Last updated by @ajax30 5 months ago.

You need use the search query above the articles variable. Like this way.

Because everytime it will paginate for page wise. If you paginate for the second page it may not contain any data. That's why you are getting the 0 value for the other page. Please use this way, i think problem will be solved.

	// Search results count
	if ($request->input('search')) {
		$article_count = $articlesQuery->count();

$articles = $articlesQuery->orderBy('id', 'desc')->paginate($this->per_page);
Solution selected by @ajax30

@ajax30 Welcome. Please share the stackoverflow link so that i can reply to your question.


Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Razvan ajax30 Joined 2 Oct 2021


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 - All rights reserved.