📜  laravel 数组强制转换 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:39.632000             🧑  作者: Mango

代码示例1
use Illuminate\Database\Eloquent\Casts\AsCollection;

/**
 * The attributes that should be cast.
 *
 * @var array
 */
protected $casts = [
    'options' => AsCollection::class,
];