ColumnSpan : Array to string conversion

Hello everyone,

Is it only me who has this problem when I try to make my columns dynamic on any of my fields, I get the following error if I try to return an array from a closure:

Array to string conversion

Here is my code:

->columnSpan(function($get) {
  return $get('show_time') ? [
      'default' => 12,
      'sm' => 12,
      'md' => 3,
      'lg' => 3,
      'xl' => 3,
      '2xl' => 3,
  ]:[
      'default' => 12,
      'sm' => 12,
      'md' => 9,
      'lg' => 9,
      'xl' => 9,
      '2xl' => 9,
  ];
})


Whereas if I pass it an array directly without closure, I have no error. Is this a bug? Or am I the only one getting this problem?
Was this page helpful?