In my users table i have column TAGS, that is serialized array, ex. serialize(['fun','promo'])
Then in my Campaign table I have also tags column similar to column in users table.
My question is how to display to user only those campaigns that have at least one tag same as in campaign tags. And if campaign has no tags display to every user no metter which tags they have. And if user has no tags set display every campaign to him.
How to query that?
$campaign = Campaign::where('tags', $user->tags);
This won't work I know because it has to search in serialized array. But how can I do that query?