diff --git a/app/Abstracts/Export.php b/app/Abstracts/Export.php index 6646105bf..9412b8039 100644 --- a/app/Abstracts/Export.php +++ b/app/Abstracts/Export.php @@ -36,17 +36,19 @@ abstract class Export implements FromCollection, HasLocalePreference, ShouldAuto public $request_class = null; - public $row_count = 250; //number of rows that will have the dropdown - - public $column_count = 25; //number of columns to be auto sized + public $column_count; //number of columns to be auto sized public $column_validations; //selects should have column_name and options + public $row_count; //number of rows that will have the dropdown + public function __construct($ids = null) { $this->ids = $ids; $this->fields = $this->fields(); $this->column_validations = $this->columnValidations(); + $this->column_count = config('excel.exports.column_count'); + $this->row_count = config('excel.exports.row_count'); $this->user = user(); } diff --git a/config/excel.php b/config/excel.php index f82fbca38..6d107518a 100644 --- a/config/excel.php +++ b/config/excel.php @@ -68,6 +68,26 @@ return [ 'manager' => '', 'company' => '', ], + + /* + |-------------------------------------------------------------------------- + | Export validations + |-------------------------------------------------------------------------- + | + | Number of rows that will have the dropdown + | + */ + 'row_count' => env('EXCEL_EXPORTS_ROW_COUNT', 250), + + /* + |-------------------------------------------------------------------------- + | Export validations + |-------------------------------------------------------------------------- + | + | Number of columns to be auto sized + | + */ + 'column_count' => env('EXCEL_EXPORTS_COLUMN_COUNT', 25), ], 'imports' => [