返回匹配多个查询标记的搜索结果?

I'm using OctoberCMS based on Laravel.

I have an html search field which query string is parsed with php.

Laravel returns database results based on the url tag parameter using MySQL WHERE LIKE.

It works with 1 tag, but how to return results matching multiple tags separated by commas or spaces?

HTML5 Search Input

<form action="/search">
  <input type="search" name="tags" multiple>
  <button type="submit">search</button>
</form>

Single tag search

localhost/search?tags=galaxy

Multiple tag search

commas localhost/search?tags=galaxy%2C+stars%2C+universe
spaces localhost/search?tags=galaxy+stars+universe

This should return any tags matching in the database table's tags column.

The problem is that it sees the query as galaxy AND stars AND universe and not individual tags: galaxy, stars, universe.

Search Results

$query_string = $tags = '';

$query_string = getenv('QUERY_STRING');

// Return search results matching query string
return $query->where('tags', 'like', "%$tags%");

$query is part of OctoberCMS.

Example

results

Problem

problem

Confusing,. Try logical OR to find value in table column may be it will help, if your finding it from webpages first fetch meta tags in function like google use keyword for search result