Answer the question
In order to leave comments, you need to log in
How to properly override protected static function vendor class in Laravel?
I need to override the class from the vendor folder. The code below throws an error Declaration of Method should be compatible with Parent Method
namespace App\PhpExcelTemplator;
use alhimik1986\PhpExcelTemplator\PhpExcelTemplator as ParentPhpExcelTemplator;
class PhpExcelTemplator extends ParentPhpExcelTemplator
{
protected static function getWriter(Spreadsheet $spreadsheet)
{
return IOFactory::createWriter($spreadsheet, 'Xlsx');
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question