It looks like the issue is with the MATCH clause in your query. It's possible that the version of MySQL you're using in your test environment is not compatible with the MATCH clause.
You can try replacing the MATCH clause with a LIKE clause instead. For example:
$conversation = Conversation::query()
->with(['groups', 'groups.contacts'])
->selectRaw('*, MATCH (hear) AGAINST (? IN NATURAL LANGUAGE MODE) AS score', [$hear])
->where('hear', 'LIKE', '%'.$hear.'%')
->havingRaw('score > ?', [0])
->orderByRaw('score DESC')
->where('match_message', 0)
->where('enabled', 1)
->first();