Export with relation fields

How do I export with the export controller relation fields?
I tried to search in the documentation and looked at the rainlab blog posts export for inspiration but got stuck.

The export is working but the categories are empty.

class TourExport extends \Backend\Models\ExportModel
{

    public $table = 'depcore_tours_tours';


    public $belongsToMany = [
        'categories' => [
            Category::class,
            'table' => 'depcore_tours_categories_tours',
            'key' => 'tour_id',
        ]
    ];

    public function exportData($columns, $sessionKey = null)
    {

        $result = self::make()
            ->with([
                'categories'
            ])
            ->get()
            ->toArray();

        return $result;

        // $tours = Tour::with('categories')->get();

        // $tours->each(function ($tour) use ($columns) {
        //     $columns['categories'] = $tour->categories->pluck('name')->implode(', ');
        //     $tour->addVisible($columns);
        // });

        // return $tours->toArray();
    }

    public function getCategoriesAttribute()
    {
        if (!$this->categories) {
            return '';
        }

        return $this->encodeArrayValue($this->categories->lists('slug'));
    }
}```