Published
- 1 min read
adonis where ilike
The solution for this is noted below
adonis where ilike
Solution
const term = request.input('term')
const posts = await Post.query()
.where('title', 'LIKE', '%' + term + '%')
.fetch()
console.log(posts)
Try other methods by searching on the site. That is if this doesn’t work