I try to get the text of a combobox from the controller so I make a query to the bd with the value of the combobox obtained but when I save it it does it with the following format ["Plant I"] (I do not know why it keeps me with bracket and quotes I only want the text). The driver code is as follows
$idpiso=$request->get('pisoroom');
$nombrepiso=DB::table('levels')->where('id',$idpiso)
->pluck('nombre');
$rooms=Room::create([
'ubicacion'=>$nombrepiso
]);