Since they both have a
name column, MySql doesn't know which to use.
Use the alias because your query doesn't specify which alias to use for the
You can update your query like
->where('posts.name', 'like', '%' . $query . '%')
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us