'How to apply class1 functions along with the class2 functions in laravel?

i am using laravel-nova for my pages and laravel is the backend for development.

public function actions(){
  return [new DownloadExcel];
}

in my project nova actions() functions are using DownloadExcel action which is responsible for downloading the excel file for that i am using laravel excel package.

i want to convert all the cell columns as a string globally,for that i write one custom class called customExcel.php which extends DownloadExcel.php along with that i wrote logic for converting all cells column to string inside the customeExcel.php file, now i have to change all occurrences of actions()like following snippet then it's working fine but i need some suggestion without changing all occurrences is there any way to load the customExcel class along with the DownloadExcel class loaded,please give me some suggestions..

public function actions(){
  return [new CustomExcel];
}


Solution 1:[1]

Since a class is extended you only implement one object. so you need to instance again.

public function actions(){
  return [new CustomExcel, new downloadExcel];
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marcel Santing