Problem with condition where

Hi everyone, I am new to Algolia and I am trying to add a condition where and I get the following error:

Invalid syntax for numeric condition:category_id=[21]

My code:

$categoria = $request->get('categoria');
$categoria_id = Category::where('nombre_categoria', $categoria)->pluck('id');

$propiedadesObtenidas = Property::search($request->get('ubicacion'))->where('category_id', $categoria_id)->paginate(5);

Could you help me locate what I’m doing wrong? Thank you very much

Sorry I forgot that pluck was returning an array.