protected $casts = [ 'published' => 'boolean', ];<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class User extends Model { /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'options' => 'array', ]; }/* array AsStringable::class boolean collection date datetime immutable_date immutable_datetime decimal:<digits> double encrypted encrypted:array encrypted:collection encrypted:object float integer object real string timestamp */<?php use Illuminate\Database\Eloquent\Casts\AsCollection; protected $casts = [ 'options' => AsCollection::class, ];