current record;
["ss,bb,nn"]
want to save as follows;
["ss","bb","nn"]
my model;
protected $casts = [
'options' => 'array',
];
my controller;
$cpoll->options = $request->options;
You can use both implode and explode to get result. Assign it to variable and do processing then import
remove braces from the array
$myString =["ss,bb,nn"];
$string = implode('', $myString);
explode it using comma(,)
$myArray = explode(',', $string );
So finally code will be
$myString = ["ss,bb,nn"];
$string = implode('', $myString);
$myArray = explode(',', $string);
return $myArray;