iprosoft - 2 months ago

Hi, is there any option to add callback to column wrapper property ? Now I can only use HTML bo it would be to long so I wan't to separate it to another class but I accept only string valuses.

protected $columns = [ 'name' => [ 'wrapper' => 'Some\Namespace\ColumnWrapper@handle', ];

Answer

ryanthompson - 2 months ago

You could have to use a column handler and do the logic there.

FooBarTableBuilder
FooBarTableColumns

The column handler will need a handle method which is method injected - $builder is available there too. Then you can use a closure for the wrapper.

ryanthompson - 2 months ago

You could have to use a column handler and do the logic there.

FooBarTableBuilder
FooBarTableColumns

The column handler will need a handle method which is method injected - $builder is available there too. Then you can use a closure for the wrapper.

iprosoft - 2 months ago

Thanks for reply. I've managed to find it earlier :-)