DEV Community

Discussion on: How to implement search functionality in laravel 8 and laravel 7 downwards

Collapse
 
favalcodes profile image
Favour Ezinne Arua

Hi Kings, Love your article, it really helps.
I'm a beginner although not a total beginner(lol), I'm actually trying to accomplish this with Laravel 7, I'm working on a blog site(my first Laravel site actually), after doing all you said and replacing the projects with post for my own project, I'm getting an error of "Route [post.index] not defined, Please how can I solve this, waiting for your response, cheers

Collapse
 
kingsconsult profile image
Kingsconsult

you don't need to change your route from GET to POST, if you are using resource route, just add the Request $request to the index, it will work

Collapse
 
favalcodes profile image
Favour Ezinne Arua

I didn't change the method, I'm still using get, I only changed where you had projects.index to posts.index because mine is a blog, I want the search to work users blog posts

Thread Thread
 
kingsconsult profile image
Kingsconsult

Unless I see your code, I can't be sure

Thread Thread
 
kingsconsult profile image
Kingsconsult

If you still getting the errors, you can contact me through my contacts, so we can go through it together