Support the ongoing development of Laravel.io →
Requests Eloquent
Last updated 2 years ago.
0
Item::where('name', 'LIKE', '%'.$key.'%')->orWhere('description', 'LIKE', '%'.$key.'%')->paginate(15);

Maybe you don't need to merge if you use this. Not tested.

Last updated 2 years ago.
0

Thanks, it works.

But it is possible there is serveral "$key", so i have to repeat this query for each "$key", and merge all the results.

Is it possible?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

soclosed soclosed Joined 5 Feb 2014

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.