From eef5227b45f1c105623af1b82c9d444532ef6e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Thu, 25 Apr 2024 12:18:25 +0300 Subject: [PATCH] updated excel config --- app/Abstracts/Export.php | 8 +++++--- config/excel.php | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) 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' => [