[Vuejs]-Laravel jsonb columns encoded as string in javascript object

0👍

I finally fixed it by casting these columns to array in my User model:

/**
 * The attributes that should be cast to native types.
 *
 * @var array
 */
protected $casts = [
    'foo' => 'array',
    'bar' => 'array'
];

Leave a comment