程式如下
$flight = new Product;
$flight->name = "iphone";//此行出错
$flight->save();
错误讯息 count(): Argument #1 ($value) must be of type Countable|array
$flight->name = "iphone"
改成 $flight->name = ["iphone"]
改成 $flight->name = (array)["iphone"]
都会得到相同的错误讯息,请问正确的语法?