From 4d9868e13ae428ef4140c96e315a09e1b7922d1a Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Mon, 28 Jul 2025 12:12:01 +0330 Subject: [PATCH 1/5] use datatable for reports --- .env.example | 6 ------ .../CumulativeCentersStatsController.php | 16 +++++++-------- .../CumulativeKeypressStatsController.php | 16 +++++++-------- ...CumulativeMessageRatingStatsController.php | 18 ++++++++++------- .../CumulativeVoiceRatingStatsController.php | 16 +++++++-------- app/Models/Cdr.php | 1 - config/database.php | 20 ------------------- 7 files changed, 35 insertions(+), 58 deletions(-) diff --git a/.env.example b/.env.example index e3d6ee7..d6e8d17 100644 --- a/.env.example +++ b/.env.example @@ -27,12 +27,6 @@ DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD= -ASTERISK_DB_HOST= -ASTERISK_DB_PORT= -ASTERISK_DB_DATABASE= -ASTERISK_DB_USERNAME= -ASTERISK_DB_PASSWORD= - SESSION_DRIVER=database SESSION_LIFETIME=120 SESSION_ENCRYPT=false diff --git a/app/Http/Controllers/HeadquartersDashboard/CumulativeCentersStatsController.php b/app/Http/Controllers/HeadquartersDashboard/CumulativeCentersStatsController.php index 2f027d6..6c3ffdf 100644 --- a/app/Http/Controllers/HeadquartersDashboard/CumulativeCentersStatsController.php +++ b/app/Http/Controllers/HeadquartersDashboard/CumulativeCentersStatsController.php @@ -4,19 +4,15 @@ namespace App\Http\Controllers\HeadquartersDashboard; use App\Facades\DataTable\DataTableFacade; use App\Http\Controllers\Controller; -use app\Http\Traits\ApiResponse; -use App\Models\CountryCallsReport; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class CumulativeCentersStatsController extends Controller { - use ApiResponse; - public function index(Request $request): JsonResponse { - $data = DB::select(" + $query = DB::table('country_calls_reports')->selectRaw(" SELECT province_id, province_name, @@ -33,7 +29,6 @@ class CumulativeCentersStatsController extends Controller SUM(talked_to_operator) as talked_to_operator, AVG(average_calls_time) as average_calls_time, SUM(fails) as fails - FROM country_calls_reports GROUP BY province_id, province_name UNION ALL @@ -54,9 +49,14 @@ class CumulativeCentersStatsController extends Controller SUM(talked_to_operator), AVG(average_calls_time), SUM(fails) - FROM country_calls_reports "); - return $this->successResponse($data); + return response()->json( + DataTableFacade::run( + $query, + $request, + allowedFilters: ['*'], + allowedSortings: ['*']) + ); } } diff --git a/app/Http/Controllers/HeadquartersDashboard/CumulativeKeypressStatsController.php b/app/Http/Controllers/HeadquartersDashboard/CumulativeKeypressStatsController.php index 809af22..5f0043f 100644 --- a/app/Http/Controllers/HeadquartersDashboard/CumulativeKeypressStatsController.php +++ b/app/Http/Controllers/HeadquartersDashboard/CumulativeKeypressStatsController.php @@ -4,19 +4,15 @@ namespace App\Http\Controllers\HeadquartersDashboard; use App\Facades\DataTable\DataTableFacade; use App\Http\Controllers\Controller; -use app\Http\Traits\ApiResponse; -use App\Models\CountryKeypressReport; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class CumulativeKeypressStatsController extends Controller { - use ApiResponse; - public function index(Request $request): JsonResponse { - $data = DB::select(" + $query = DB::table('country_keypress_reports')->selectRaw(" SELECT province_id, province_name, @@ -35,7 +31,6 @@ class CumulativeKeypressStatsController extends Controller SUM(key2_1) as key2_1, SUM(key2_2) as key2_2, SUM(key2_3) as key2_3 - FROM country_keypress_reports GROUP BY province_id, province_name UNION ALL @@ -58,9 +53,14 @@ class CumulativeKeypressStatsController extends Controller SUM(key2_1), SUM(key2_2), SUM(key2_3) - FROM country_keypress_reports "); - return $this->successResponse($data); + return response()->json( + DataTableFacade::run( + $query, + $request, + allowedFilters: ['*'], + allowedSortings: ['*']) + ); } } diff --git a/app/Http/Controllers/HeadquartersDashboard/CumulativeMessageRatingStatsController.php b/app/Http/Controllers/HeadquartersDashboard/CumulativeMessageRatingStatsController.php index dadaad3..6135863 100644 --- a/app/Http/Controllers/HeadquartersDashboard/CumulativeMessageRatingStatsController.php +++ b/app/Http/Controllers/HeadquartersDashboard/CumulativeMessageRatingStatsController.php @@ -2,18 +2,18 @@ namespace App\Http\Controllers\HeadquartersDashboard; +use App\Facades\DataTable\DataTableFacade; use App\Http\Controllers\Controller; use app\Http\Traits\ApiResponse; use Illuminate\Http\JsonResponse; +use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class CumulativeMessageRatingStatsController extends Controller { - use ApiResponse; - - public function index(): JsonResponse + public function index(Request $request): JsonResponse { - $data = DB::select(" + $query = DB::table('country_message_rating_reports')->selectRaw(" SELECT province_id, province_name, @@ -26,7 +26,6 @@ class CumulativeMessageRatingStatsController extends Controller SUM(action3) as action3, SUM(action4) as action4, SUM(action5) as action5 - FROM country_message_rating_reports GROUP BY province_id, province_name UNION ALL @@ -43,9 +42,14 @@ class CumulativeMessageRatingStatsController extends Controller SUM(action3), SUM(action4), SUM(action5) - FROM country_message_rating_reports "); - return $this->successResponse($data); + return response()->json( + DataTableFacade::run( + $query, + $request, + allowedFilters: ['*'], + allowedSortings: ['*']) + ); } } diff --git a/app/Http/Controllers/HeadquartersDashboard/CumulativeVoiceRatingStatsController.php b/app/Http/Controllers/HeadquartersDashboard/CumulativeVoiceRatingStatsController.php index dc37863..1c5d7ff 100644 --- a/app/Http/Controllers/HeadquartersDashboard/CumulativeVoiceRatingStatsController.php +++ b/app/Http/Controllers/HeadquartersDashboard/CumulativeVoiceRatingStatsController.php @@ -4,19 +4,15 @@ namespace App\Http\Controllers\HeadquartersDashboard; use App\Facades\DataTable\DataTableFacade; use App\Http\Controllers\Controller; -use app\Http\Traits\ApiResponse; -use App\Models\CountryVoiceRatingReport; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class CumulativeVoiceRatingStatsController extends Controller { - use ApiResponse; - public function index(Request $request): JsonResponse { - $data = DB::select(" + $query = DB::table('country_voice_rating_reports')->selectRaw(" SELECT province_id, province_name, @@ -24,7 +20,6 @@ class CumulativeVoiceRatingStatsController extends Controller SUM(message_format_ok) as message_format_ok, SUM(message_quality_nok) as message_quality_nok, SUM(message_format_nok) as message_format_nok - FROM country_voice_rating_reports GROUP BY province_id, province_name UNION ALL @@ -36,9 +31,14 @@ class CumulativeVoiceRatingStatsController extends Controller SUM(message_format_ok), SUM(message_quality_nok), SUM(message_format_nok) - FROM country_voice_rating_reports "); - return $this->successResponse($data); + return response()->json( + DataTableFacade::run( + $query, + $request, + allowedFilters: ['*'], + allowedSortings: ['*']) + ); } } diff --git a/app/Models/Cdr.php b/app/Models/Cdr.php index 1146aac..50c6c63 100644 --- a/app/Models/Cdr.php +++ b/app/Models/Cdr.php @@ -6,6 +6,5 @@ use Illuminate\Database\Eloquent\Model; class Cdr extends Model { - protected $connection = 'asterisk'; protected $table = 'cdr'; } diff --git a/config/database.php b/config/database.php index a7c6244..3bbe18f 100644 --- a/config/database.php +++ b/config/database.php @@ -111,26 +111,6 @@ return [ // 'encrypt' => env('DB_ENCRYPT', 'yes'), // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), ], - - 'asterisk' => [ - 'driver' => 'mysql', - 'url' => env('DB_URL'), - 'host' => env('ASTERISK_DB_HOST', '127.0.0.1'), - 'port' => env('ASTERISK_DB_PORT', '3306'), - 'database' => env('ASTERISK_DB_DATABASE', 'laravel'), - 'username' => env('ASTERISK_DB_USERNAME', 'root'), - 'password' => env('ASTERISK_DB_PASSWORD', ''), - 'unix_socket' => env('DB_SOCKET', ''), - 'charset' => env('DB_CHARSET', 'utf8mb4'), - 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), - 'prefix' => '', - 'prefix_indexes' => true, - 'strict' => true, - 'engine' => null, - 'options' => extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), - ]) : [], - ], ], /* From 21f573e18443a38c57ee35a2d7b5020ce01759f1 Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Mon, 28 Jul 2025 14:08:56 +0330 Subject: [PATCH 2/5] use builder for query --- .../CumulativeCentersStatsController.php | 48 ++++++++++--------- .../CumulativeKeypressStatsController.php | 45 ++++++++--------- ...CumulativeMessageRatingStatsController.php | 11 ++--- .../CumulativeVoiceRatingStatsController.php | 11 ++--- .../Admin/UserManagement/StoreRequest.php | 2 +- 5 files changed, 55 insertions(+), 62 deletions(-) diff --git a/app/Http/Controllers/HeadquartersDashboard/CumulativeCentersStatsController.php b/app/Http/Controllers/HeadquartersDashboard/CumulativeCentersStatsController.php index 6c3ffdf..70141c6 100644 --- a/app/Http/Controllers/HeadquartersDashboard/CumulativeCentersStatsController.php +++ b/app/Http/Controllers/HeadquartersDashboard/CumulativeCentersStatsController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers\HeadquartersDashboard; use App\Facades\DataTable\DataTableFacade; use App\Http\Controllers\Controller; +use App\Models\CountryCallsReport; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; @@ -12,8 +13,8 @@ class CumulativeCentersStatsController extends Controller { public function index(Request $request): JsonResponse { - $query = DB::table('country_calls_reports')->selectRaw(" - SELECT + $query = DB::table('country_calls_reports') + ->selectRaw(" province_id, province_name, SUM(total) as total, @@ -29,27 +30,28 @@ class CumulativeCentersStatsController extends Controller SUM(talked_to_operator) as talked_to_operator, AVG(average_calls_time) as average_calls_time, SUM(fails) as fails - GROUP BY province_id, province_name - - UNION ALL - - SELECT - 0 as province_id, - 'کشور' as province_name, - SUM(total), - SUM(route_to_teh4), - SUM(route_to_teh5), - SUM(route_to_os4), - SUM(route_to_os5), - SUM(answered), - SUM(answered_over10), - SUM(missed), - SUM(dnd), - SUM(transferred), - SUM(talked_to_operator), - AVG(average_calls_time), - SUM(fails) - "); + ") + ->groupBy('province_id', 'province_name') + ->unionAll( + DB::table('country_calls_reports') + ->selectRaw(" + 0 as province_id, + 'کشوری' as province_name, + SUM(total), + SUM(route_to_teh4), + SUM(route_to_teh5), + SUM(route_to_os4), + SUM(route_to_os5), + SUM(answered), + SUM(answered_over10), + SUM(missed), + SUM(dnd), + SUM(transferred), + SUM(talked_to_operator), + AVG(average_calls_time), + SUM(fails) + ") + ); return response()->json( DataTableFacade::run( diff --git a/app/Http/Controllers/HeadquartersDashboard/CumulativeKeypressStatsController.php b/app/Http/Controllers/HeadquartersDashboard/CumulativeKeypressStatsController.php index 5f0043f..805f6e1 100644 --- a/app/Http/Controllers/HeadquartersDashboard/CumulativeKeypressStatsController.php +++ b/app/Http/Controllers/HeadquartersDashboard/CumulativeKeypressStatsController.php @@ -13,7 +13,6 @@ class CumulativeKeypressStatsController extends Controller public function index(Request $request): JsonResponse { $query = DB::table('country_keypress_reports')->selectRaw(" - SELECT province_id, province_name, SUM(total) as total, @@ -31,29 +30,27 @@ class CumulativeKeypressStatsController extends Controller SUM(key2_1) as key2_1, SUM(key2_2) as key2_2, SUM(key2_3) as key2_3 - GROUP BY province_id, province_name - - UNION ALL - - SELECT - 0 as province_id, - 'کشوری' as province_name, - SUM(total), - SUM(key1), - SUM(key2), - SUM(key3), - SUM(key4), - SUM(key5), - SUM(key6), - SUM(key9), - SUM(key4_1), - SUM(key4_2), - SUM(key5_1), - SUM(key5_2), - SUM(key2_1), - SUM(key2_2), - SUM(key2_3) - "); + ") + ->groupBy('province_id', 'province_name') + ->unionAll(DB::table('country_keypress_reports')->selectRaw(" + 0 as province_id, + 'کشوری' as province_name, + SUM(total), + SUM(key1), + SUM(key2), + SUM(key3), + SUM(key4), + SUM(key5), + SUM(key6), + SUM(key9), + SUM(key4_1), + SUM(key4_2), + SUM(key5_1), + SUM(key5_2), + SUM(key2_1), + SUM(key2_2), + SUM(key2_3) + ")); return response()->json( DataTableFacade::run( diff --git a/app/Http/Controllers/HeadquartersDashboard/CumulativeMessageRatingStatsController.php b/app/Http/Controllers/HeadquartersDashboard/CumulativeMessageRatingStatsController.php index 6135863..12b60de 100644 --- a/app/Http/Controllers/HeadquartersDashboard/CumulativeMessageRatingStatsController.php +++ b/app/Http/Controllers/HeadquartersDashboard/CumulativeMessageRatingStatsController.php @@ -14,7 +14,6 @@ class CumulativeMessageRatingStatsController extends Controller public function index(Request $request): JsonResponse { $query = DB::table('country_message_rating_reports')->selectRaw(" - SELECT province_id, province_name, SUM(total) as total, @@ -26,11 +25,9 @@ class CumulativeMessageRatingStatsController extends Controller SUM(action3) as action3, SUM(action4) as action4, SUM(action5) as action5 - GROUP BY province_id, province_name - - UNION ALL - - SELECT + ") + ->groupBy('province_id', 'province_name') + ->unionAll(DB::table('country_message_rating_reports')->selectRaw(" 0 as province_id, 'کشوری' as province_name, SUM(total), @@ -42,7 +39,7 @@ class CumulativeMessageRatingStatsController extends Controller SUM(action3), SUM(action4), SUM(action5) - "); + ")); return response()->json( DataTableFacade::run( diff --git a/app/Http/Controllers/HeadquartersDashboard/CumulativeVoiceRatingStatsController.php b/app/Http/Controllers/HeadquartersDashboard/CumulativeVoiceRatingStatsController.php index 1c5d7ff..f5008cd 100644 --- a/app/Http/Controllers/HeadquartersDashboard/CumulativeVoiceRatingStatsController.php +++ b/app/Http/Controllers/HeadquartersDashboard/CumulativeVoiceRatingStatsController.php @@ -13,25 +13,22 @@ class CumulativeVoiceRatingStatsController extends Controller public function index(Request $request): JsonResponse { $query = DB::table('country_voice_rating_reports')->selectRaw(" - SELECT province_id, province_name, SUM(message_quality_ok) as message_quality_ok, SUM(message_format_ok) as message_format_ok, SUM(message_quality_nok) as message_quality_nok, SUM(message_format_nok) as message_format_nok - GROUP BY province_id, province_name - - UNION ALL - - SELECT + ") + ->groupBy('province_id', 'province_name') + ->unionAll(DB::table('country_voice_rating_reports')->selectRaw(" 0 as province_id, 'کشوری' as province_name, SUM(message_quality_ok), SUM(message_format_ok), SUM(message_quality_nok), SUM(message_format_nok) - "); + ")); return response()->json( DataTableFacade::run( diff --git a/app/Http/Requests/Admin/UserManagement/StoreRequest.php b/app/Http/Requests/Admin/UserManagement/StoreRequest.php index cc34bdb..b47db05 100644 --- a/app/Http/Requests/Admin/UserManagement/StoreRequest.php +++ b/app/Http/Requests/Admin/UserManagement/StoreRequest.php @@ -26,7 +26,7 @@ class StoreRequest extends FormRequest 'full_name' => 'required|max:255|string', 'username' => 'required|unique:users,username|string', 'position' => 'required', - 'gender' => 'required|in:1,2', + 'gender' => 'required|in:male,female', 'national_id' => 'required|digits:10|unique:users,national_id', 'phone_number' => 'required|numeric|digits:11|unique:users,phone_number|regex:/^09\d{9}$/', 'province_id' => 'required|exists:provinces,id', From 3cfe1446e62b2ef96201e6d07b3c3e10b76a44ec Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Tue, 29 Jul 2025 13:45:30 +0330 Subject: [PATCH 3/5] create province tables --- .env.example | 4 +- app/Enums/PeopleMessageActions.php | 10 +++++ app/Models/OperatorDialogueRating.php | 15 ++++++++ app/Models/PeopleMessage.php | 14 +++++++ app/Models/PeopleMessageAction.php | 14 +++++++ app/Models/SystemMessage.php | 14 +++++++ .../OperatorDialogueRatingFactory.php | 23 ++++++++++++ .../factories/PeopleMessageActionFactory.php | 23 ++++++++++++ database/factories/PeopleMessageFactory.php | 23 ++++++++++++ database/factories/SystemMessageFactory.php | 23 ++++++++++++ ...09_create_people_message_actions_table.php | 28 ++++++++++++++ ...29_063532_create_system_messages_table.php | 34 +++++++++++++++++ ...create_operator_dialogue_ratings_table.php | 33 +++++++++++++++++ ...29_094322_create_people_messages_table.php | 37 +++++++++++++++++++ .../seeders/OperatorDialogueRatingSeeder.php | 17 +++++++++ .../seeders/PeopleMessageActionSeeder.php | 17 +++++++++ database/seeders/PeopleMessageSeeder.php | 17 +++++++++ database/seeders/SystemMessageSeeder.php | 17 +++++++++ 18 files changed, 361 insertions(+), 2 deletions(-) create mode 100644 app/Enums/PeopleMessageActions.php create mode 100644 app/Models/OperatorDialogueRating.php create mode 100644 app/Models/PeopleMessage.php create mode 100644 app/Models/PeopleMessageAction.php create mode 100644 app/Models/SystemMessage.php create mode 100644 database/factories/OperatorDialogueRatingFactory.php create mode 100644 database/factories/PeopleMessageActionFactory.php create mode 100644 database/factories/PeopleMessageFactory.php create mode 100644 database/factories/SystemMessageFactory.php create mode 100644 database/migrations/2025_07_24_095509_create_people_message_actions_table.php create mode 100644 database/migrations/2025_07_29_063532_create_system_messages_table.php create mode 100644 database/migrations/2025_07_29_072224_create_operator_dialogue_ratings_table.php create mode 100644 database/migrations/2025_07_29_094322_create_people_messages_table.php create mode 100644 database/seeders/OperatorDialogueRatingSeeder.php create mode 100644 database/seeders/PeopleMessageActionSeeder.php create mode 100644 database/seeders/PeopleMessageSeeder.php create mode 100644 database/seeders/SystemMessageSeeder.php diff --git a/.env.example b/.env.example index d6e8d17..6f8f318 100644 --- a/.env.example +++ b/.env.example @@ -20,9 +20,9 @@ LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug -DB_CONNECTION=pgsql +DB_CONNECTION=mysql DB_HOST=127.0.0.1 -DB_PORT=5432 +DB_PORT=3306 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD= diff --git a/app/Enums/PeopleMessageActions.php b/app/Enums/PeopleMessageActions.php new file mode 100644 index 0000000..64c3b56 --- /dev/null +++ b/app/Enums/PeopleMessageActions.php @@ -0,0 +1,10 @@ + */ + use HasFactory; + + protected $guarded = []; +} diff --git a/app/Models/PeopleMessage.php b/app/Models/PeopleMessage.php new file mode 100644 index 0000000..6aa3379 --- /dev/null +++ b/app/Models/PeopleMessage.php @@ -0,0 +1,14 @@ + */ + use HasFactory; + + protected $guarded = []; +} diff --git a/app/Models/PeopleMessageAction.php b/app/Models/PeopleMessageAction.php new file mode 100644 index 0000000..5c98c9f --- /dev/null +++ b/app/Models/PeopleMessageAction.php @@ -0,0 +1,14 @@ + */ + use HasFactory; + + protected $guarded = []; +} diff --git a/app/Models/SystemMessage.php b/app/Models/SystemMessage.php new file mode 100644 index 0000000..20e004a --- /dev/null +++ b/app/Models/SystemMessage.php @@ -0,0 +1,14 @@ + */ + use HasFactory; + + protected $guarded = []; +} diff --git a/database/factories/OperatorDialogueRatingFactory.php b/database/factories/OperatorDialogueRatingFactory.php new file mode 100644 index 0000000..1d80042 --- /dev/null +++ b/database/factories/OperatorDialogueRatingFactory.php @@ -0,0 +1,23 @@ + + */ +class OperatorDialogueRatingFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/factories/PeopleMessageActionFactory.php b/database/factories/PeopleMessageActionFactory.php new file mode 100644 index 0000000..08765e5 --- /dev/null +++ b/database/factories/PeopleMessageActionFactory.php @@ -0,0 +1,23 @@ + + */ +class PeopleMessageActionFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/factories/PeopleMessageFactory.php b/database/factories/PeopleMessageFactory.php new file mode 100644 index 0000000..05ee363 --- /dev/null +++ b/database/factories/PeopleMessageFactory.php @@ -0,0 +1,23 @@ + + */ +class PeopleMessageFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/factories/SystemMessageFactory.php b/database/factories/SystemMessageFactory.php new file mode 100644 index 0000000..7be37a9 --- /dev/null +++ b/database/factories/SystemMessageFactory.php @@ -0,0 +1,23 @@ + + */ +class SystemMessageFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/migrations/2025_07_24_095509_create_people_message_actions_table.php b/database/migrations/2025_07_24_095509_create_people_message_actions_table.php new file mode 100644 index 0000000..b751838 --- /dev/null +++ b/database/migrations/2025_07_24_095509_create_people_message_actions_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('name'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('people_message_actions'); + } +}; diff --git a/database/migrations/2025_07_29_063532_create_system_messages_table.php b/database/migrations/2025_07_29_063532_create_system_messages_table.php new file mode 100644 index 0000000..089c5c7 --- /dev/null +++ b/database/migrations/2025_07_29_063532_create_system_messages_table.php @@ -0,0 +1,34 @@ +id(); + $table->integer('duration'); + $table->dateTime('date'); + $table->string('voice'); + $table->integer('message_quality'); + $table->integer('format_quality'); + $table->integer('type_id'); + $table->string('type_name'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('system_messages'); + } +}; diff --git a/database/migrations/2025_07_29_072224_create_operator_dialogue_ratings_table.php b/database/migrations/2025_07_29_072224_create_operator_dialogue_ratings_table.php new file mode 100644 index 0000000..ca6c42c --- /dev/null +++ b/database/migrations/2025_07_29_072224_create_operator_dialogue_ratings_table.php @@ -0,0 +1,33 @@ +id(); + $table->string('cdr_unique_id'); + $table->dateTime('date'); + $table->foreignId('expert_id')->constrained('users'); + $table->boolean('is_listen')->default(false); + $table->boolean('is_good'); + $table->string('description')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('operator_dialogue_ratings'); + } +}; diff --git a/database/migrations/2025_07_29_094322_create_people_messages_table.php b/database/migrations/2025_07_29_094322_create_people_messages_table.php new file mode 100644 index 0000000..b9f6f53 --- /dev/null +++ b/database/migrations/2025_07_29_094322_create_people_messages_table.php @@ -0,0 +1,37 @@ +id(); + $table->string('caller_phone_number'); + $table->dateTime('date'); + $table->string('voice'); + $table->integer('review_duration')->nullable(); + $table->dateTime('listen_at')->nullable(); + $table->boolean('is_listen')->default(false); + $table->foreignId('action_id')->nullable()->constrained(); + $table->string('action_name')->nullable(); + $table->string('description')->nullable(); + $table->unsignedBigInteger('savaneh_id')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('people_messages'); + } +}; diff --git a/database/seeders/OperatorDialogueRatingSeeder.php b/database/seeders/OperatorDialogueRatingSeeder.php new file mode 100644 index 0000000..27a7eff --- /dev/null +++ b/database/seeders/OperatorDialogueRatingSeeder.php @@ -0,0 +1,17 @@ + Date: Wed, 30 Jul 2025 09:37:33 +0330 Subject: [PATCH 4/5] create system messages and people messages --- app/Enums/PeopleMessageActions.php | 13 + app/Http/Controllers/ProfileController.php | 6 +- .../PeopleMessages/OperatorController.php | 49 ++ .../PeopleMessages/SupervisorController.php | 57 ++ .../SystemMessages/OperatorController.php | 40 ++ .../SystemMessages/SupervisorController.php | 48 ++ .../SystemMessages/RateRequest.php | 30 + .../PeopleMessages/DataTableService.php | 28 + .../SystemMessages/OperatorService.php | 25 + .../SystemMessages/SupervisorService.php | 23 + bootstrap/providers.php | 1 + composer.json | 1 + composer.lock | 595 +++++++++++++++++- config/excel.php | 380 +++++++++++ 14 files changed, 1290 insertions(+), 6 deletions(-) create mode 100644 app/Http/Controllers/ProvinceDashboard/PeopleMessages/OperatorController.php create mode 100644 app/Http/Controllers/ProvinceDashboard/PeopleMessages/SupervisorController.php create mode 100644 app/Http/Controllers/ProvinceDashboard/SystemMessages/OperatorController.php create mode 100644 app/Http/Controllers/ProvinceDashboard/SystemMessages/SupervisorController.php create mode 100644 app/Http/Requests/ProvinceDashboard/SystemMessages/RateRequest.php create mode 100644 app/Services/Dashboard/Province/PeopleMessages/DataTableService.php create mode 100644 app/Services/Dashboard/Province/SystemMessages/OperatorService.php create mode 100644 app/Services/Dashboard/Province/SystemMessages/SupervisorService.php create mode 100644 config/excel.php diff --git a/app/Enums/PeopleMessageActions.php b/app/Enums/PeopleMessageActions.php index 64c3b56..41e2def 100644 --- a/app/Enums/PeopleMessageActions.php +++ b/app/Enums/PeopleMessageActions.php @@ -7,4 +7,17 @@ enum PeopleMessageActions: int case x = 1; case y = 2; case z = 3; + + public static function name(int $state): string + { + $mapArray = [ + 1 => 'عدم نیاز به ثبت (مشکل راه)', + 2 => 'عدم نیاز به ثبت (مشکل حمل و نقلی)', + 3 => 'عدم نیاز به ثبت (مشکل عوارضی)', + 4 => 'ثبت سوانح (مشکل راه)', + 5 => 'ثبت سوانح (مشکل حمل و نقلی)', + ]; + + return $mapArray[$state]; + } } diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index fb6053f..887c227 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -7,7 +7,6 @@ use App\Http\Requests\Profile\ChangeAvatarRequest; use App\Http\Requests\Profile\ChangePasswordRequest; use App\Http\Resources\Admin\UserResource; use App\Http\Traits\ApiResponse; -use App\Models\Session; use App\Models\User; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; @@ -59,10 +58,7 @@ class ProfileController extends Controller public function offline(Request $request): JsonResponse { $user= User::query()->where('telephone_id', '=', $request->telephone_id)->first(); - $user->update([ - 'is_online' => false, - ]); - Session::query()->where('user_id','=',$user->id)->delete(); + $user->update(['is_online' => false]); return $this->successResponse(); } diff --git a/app/Http/Controllers/ProvinceDashboard/PeopleMessages/OperatorController.php b/app/Http/Controllers/ProvinceDashboard/PeopleMessages/OperatorController.php new file mode 100644 index 0000000..41677ec --- /dev/null +++ b/app/Http/Controllers/ProvinceDashboard/PeopleMessages/OperatorController.php @@ -0,0 +1,49 @@ +json($dataTableService->index($request)); + } + + public function excel() + { + + } + + public function handle(Request $request, PeopleMessage $peopleMessage): JsonResponse + { + $peopleMessage->update([ + 'listen_at' => now(), + 'is_listen' => true, + 'action_id' => $request->action_id, + 'action_name' => PeopleMessageActions::name($request->action_id), + 'description' => $request->description, + 'savaneh_id' => $request->savaneh_id, + ]); + return $this->successResponse(); + } + + /** + * Display the specified resource. + */ + public function show(PeopleMessage $peopleMessage): JsonResponse + { + return $this->successResponse($peopleMessage); + } +} diff --git a/app/Http/Controllers/ProvinceDashboard/PeopleMessages/SupervisorController.php b/app/Http/Controllers/ProvinceDashboard/PeopleMessages/SupervisorController.php new file mode 100644 index 0000000..49d7365 --- /dev/null +++ b/app/Http/Controllers/ProvinceDashboard/PeopleMessages/SupervisorController.php @@ -0,0 +1,57 @@ +json($operatorService->datatable($request)); + } + + /** + * Display the specified resource. + */ + public function show(SystemMessage $systemMessage): JsonResponse + { + return $this->successResponse($systemMessage->only(['id','duration','date', 'voice'])); + } + + public function download(string $id) + { + // + } + + public function excel() + { + + } +} diff --git a/app/Http/Controllers/ProvinceDashboard/SystemMessages/SupervisorController.php b/app/Http/Controllers/ProvinceDashboard/SystemMessages/SupervisorController.php new file mode 100644 index 0000000..af3cbac --- /dev/null +++ b/app/Http/Controllers/ProvinceDashboard/SystemMessages/SupervisorController.php @@ -0,0 +1,48 @@ +json($supervisorService->datatable($request)); + } + + public function excel() + { + + } + + /** + * Store a newly created resource in storage. + */ + public function rate(RateRequest $request, SystemMessage $systemMessage): JsonResponse + { + $systemMessage->update([ + 'message_quality' => $request->message_quality, + 'format_quality' => $request->format_quality, + ]); + return $this->successResponse(); + } + + /** + * Display the specified resource. + */ + public function show(SystemMessage $systemMessage): JsonResponse + { + return $this->successResponse($systemMessage); + } +} diff --git a/app/Http/Requests/ProvinceDashboard/SystemMessages/RateRequest.php b/app/Http/Requests/ProvinceDashboard/SystemMessages/RateRequest.php new file mode 100644 index 0000000..dbee8c1 --- /dev/null +++ b/app/Http/Requests/ProvinceDashboard/SystemMessages/RateRequest.php @@ -0,0 +1,30 @@ + + */ + public function rules(): array + { + return [ + 'message_quality' => 'required|in:0,1', + 'format_quality' => 'required|in:0,1', + ]; + } +} diff --git a/app/Services/Dashboard/Province/PeopleMessages/DataTableService.php b/app/Services/Dashboard/Province/PeopleMessages/DataTableService.php new file mode 100644 index 0000000..6fe18db --- /dev/null +++ b/app/Services/Dashboard/Province/PeopleMessages/DataTableService.php @@ -0,0 +1,28 @@ +user(); + + $query = PeopleMessage::query()->where('edare_shahri_id', '=', $user->edarate_shahri_id); + + return DataTableFacade::run( + $query, + $request, + allowedFilters: ['*'], + allowedSortings: ['*'], + allowedSelects: [ + 'id','caller_phone_number','date', 'voice', 'listen_at', 'review_duration', + 'is_listen', 'action_id', 'action_name', 'description', 'savaneh_id' + ] + ); + } +} diff --git a/app/Services/Dashboard/Province/SystemMessages/OperatorService.php b/app/Services/Dashboard/Province/SystemMessages/OperatorService.php new file mode 100644 index 0000000..54460b8 --- /dev/null +++ b/app/Services/Dashboard/Province/SystemMessages/OperatorService.php @@ -0,0 +1,25 @@ +user(); + + $query = SystemMessage::query()->where('edare_shahri_id', '=', $user->edarate_shahri_id); + + return DataTableFacade::run( + $query, + $request, + allowedFilters: ['*'], + allowedSortings: ['*'], + allowedSelects: ['id','duration','date', 'voice', 'type_id', 'type_name'] + ); + } +} diff --git a/app/Services/Dashboard/Province/SystemMessages/SupervisorService.php b/app/Services/Dashboard/Province/SystemMessages/SupervisorService.php new file mode 100644 index 0000000..8f6584c --- /dev/null +++ b/app/Services/Dashboard/Province/SystemMessages/SupervisorService.php @@ -0,0 +1,23 @@ + [ + + /* + |-------------------------------------------------------------------------- + | Chunk size + |-------------------------------------------------------------------------- + | + | When using FromQuery, the query is automatically chunked. + | Here you can specify how big the chunk should be. + | + */ + 'chunk_size' => 1000, + + /* + |-------------------------------------------------------------------------- + | Pre-calculate formulas during export + |-------------------------------------------------------------------------- + */ + 'pre_calculate_formulas' => false, + + /* + |-------------------------------------------------------------------------- + | Enable strict null comparison + |-------------------------------------------------------------------------- + | + | When enabling strict null comparison empty cells ('') will + | be added to the sheet. + */ + 'strict_null_comparison' => false, + + /* + |-------------------------------------------------------------------------- + | CSV Settings + |-------------------------------------------------------------------------- + | + | Configure e.g. delimiter, enclosure and line ending for CSV exports. + | + */ + 'csv' => [ + 'delimiter' => ',', + 'enclosure' => '"', + 'line_ending' => PHP_EOL, + 'use_bom' => false, + 'include_separator_line' => false, + 'excel_compatibility' => false, + 'output_encoding' => '', + 'test_auto_detect' => true, + ], + + /* + |-------------------------------------------------------------------------- + | Worksheet properties + |-------------------------------------------------------------------------- + | + | Configure e.g. default title, creator, subject,... + | + */ + 'properties' => [ + 'creator' => '', + 'lastModifiedBy' => '', + 'title' => '', + 'description' => '', + 'subject' => '', + 'keywords' => '', + 'category' => '', + 'manager' => '', + 'company' => '', + ], + ], + + 'imports' => [ + + /* + |-------------------------------------------------------------------------- + | Read Only + |-------------------------------------------------------------------------- + | + | When dealing with imports, you might only be interested in the + | data that the sheet exists. By default we ignore all styles, + | however if you want to do some logic based on style data + | you can enable it by setting read_only to false. + | + */ + 'read_only' => true, + + /* + |-------------------------------------------------------------------------- + | Ignore Empty + |-------------------------------------------------------------------------- + | + | When dealing with imports, you might be interested in ignoring + | rows that have null values or empty strings. By default rows + | containing empty strings or empty values are not ignored but can be + | ignored by enabling the setting ignore_empty to true. + | + */ + 'ignore_empty' => false, + + /* + |-------------------------------------------------------------------------- + | Heading Row Formatter + |-------------------------------------------------------------------------- + | + | Configure the heading row formatter. + | Available options: none|slug|custom + | + */ + 'heading_row' => [ + 'formatter' => 'slug', + ], + + /* + |-------------------------------------------------------------------------- + | CSV Settings + |-------------------------------------------------------------------------- + | + | Configure e.g. delimiter, enclosure and line ending for CSV imports. + | + */ + 'csv' => [ + 'delimiter' => null, + 'enclosure' => '"', + 'escape_character' => '\\', + 'contiguous' => false, + 'input_encoding' => Csv::GUESS_ENCODING, + ], + + /* + |-------------------------------------------------------------------------- + | Worksheet properties + |-------------------------------------------------------------------------- + | + | Configure e.g. default title, creator, subject,... + | + */ + 'properties' => [ + 'creator' => '', + 'lastModifiedBy' => '', + 'title' => '', + 'description' => '', + 'subject' => '', + 'keywords' => '', + 'category' => '', + 'manager' => '', + 'company' => '', + ], + + /* + |-------------------------------------------------------------------------- + | Cell Middleware + |-------------------------------------------------------------------------- + | + | Configure middleware that is executed on getting a cell value + | + */ + 'cells' => [ + 'middleware' => [ + //\Maatwebsite\Excel\Middleware\TrimCellValue::class, + //\Maatwebsite\Excel\Middleware\ConvertEmptyCellValuesToNull::class, + ], + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Extension detector + |-------------------------------------------------------------------------- + | + | Configure here which writer/reader type should be used when the package + | needs to guess the correct type based on the extension alone. + | + */ + 'extension_detector' => [ + 'xlsx' => Excel::XLSX, + 'xlsm' => Excel::XLSX, + 'xltx' => Excel::XLSX, + 'xltm' => Excel::XLSX, + 'xls' => Excel::XLS, + 'xlt' => Excel::XLS, + 'ods' => Excel::ODS, + 'ots' => Excel::ODS, + 'slk' => Excel::SLK, + 'xml' => Excel::XML, + 'gnumeric' => Excel::GNUMERIC, + 'htm' => Excel::HTML, + 'html' => Excel::HTML, + 'csv' => Excel::CSV, + 'tsv' => Excel::TSV, + + /* + |-------------------------------------------------------------------------- + | PDF Extension + |-------------------------------------------------------------------------- + | + | Configure here which Pdf driver should be used by default. + | Available options: Excel::MPDF | Excel::TCPDF | Excel::DOMPDF + | + */ + 'pdf' => Excel::DOMPDF, + ], + + /* + |-------------------------------------------------------------------------- + | Value Binder + |-------------------------------------------------------------------------- + | + | PhpSpreadsheet offers a way to hook into the process of a value being + | written to a cell. In there some assumptions are made on how the + | value should be formatted. If you want to change those defaults, + | you can implement your own default value binder. + | + | Possible value binders: + | + | [x] Maatwebsite\Excel\DefaultValueBinder::class + | [x] PhpOffice\PhpSpreadsheet\Cell\StringValueBinder::class + | [x] PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder::class + | + */ + 'value_binder' => [ + 'default' => Maatwebsite\Excel\DefaultValueBinder::class, + ], + + 'cache' => [ + /* + |-------------------------------------------------------------------------- + | Default cell caching driver + |-------------------------------------------------------------------------- + | + | By default PhpSpreadsheet keeps all cell values in memory, however when + | dealing with large files, this might result into memory issues. If you + | want to mitigate that, you can configure a cell caching driver here. + | When using the illuminate driver, it will store each value in the + | cache store. This can slow down the process, because it needs to + | store each value. You can use the "batch" store if you want to + | only persist to the store when the memory limit is reached. + | + | Drivers: memory|illuminate|batch + | + */ + 'driver' => 'memory', + + /* + |-------------------------------------------------------------------------- + | Batch memory caching + |-------------------------------------------------------------------------- + | + | When dealing with the "batch" caching driver, it will only + | persist to the store when the memory limit is reached. + | Here you can tweak the memory limit to your liking. + | + */ + 'batch' => [ + 'memory_limit' => 60000, + ], + + /* + |-------------------------------------------------------------------------- + | Illuminate cache + |-------------------------------------------------------------------------- + | + | When using the "illuminate" caching driver, it will automatically use + | your default cache store. However if you prefer to have the cell + | cache on a separate store, you can configure the store name here. + | You can use any store defined in your cache config. When leaving + | at "null" it will use the default store. + | + */ + 'illuminate' => [ + 'store' => null, + ], + + /* + |-------------------------------------------------------------------------- + | Cache Time-to-live (TTL) + |-------------------------------------------------------------------------- + | + | The TTL of items written to cache. If you want to keep the items cached + | indefinitely, set this to null. Otherwise, set a number of seconds, + | a \DateInterval, or a callable. + | + | Allowable types: callable|\DateInterval|int|null + | + */ + 'default_ttl' => 10800, + ], + + /* + |-------------------------------------------------------------------------- + | Transaction Handler + |-------------------------------------------------------------------------- + | + | By default the import is wrapped in a transaction. This is useful + | for when an import may fail and you want to retry it. With the + | transactions, the previous import gets rolled-back. + | + | You can disable the transaction handler by setting this to null. + | Or you can choose a custom made transaction handler here. + | + | Supported handlers: null|db + | + */ + 'transactions' => [ + 'handler' => 'db', + 'db' => [ + 'connection' => null, + ], + ], + + 'temporary_files' => [ + + /* + |-------------------------------------------------------------------------- + | Local Temporary Path + |-------------------------------------------------------------------------- + | + | When exporting and importing files, we use a temporary file, before + | storing reading or downloading. Here you can customize that path. + | permissions is an array with the permission flags for the directory (dir) + | and the create file (file). + | + */ + 'local_path' => storage_path('framework/cache/laravel-excel'), + + /* + |-------------------------------------------------------------------------- + | Local Temporary Path Permissions + |-------------------------------------------------------------------------- + | + | Permissions is an array with the permission flags for the directory (dir) + | and the create file (file). + | If omitted the default permissions of the filesystem will be used. + | + */ + 'local_permissions' => [ + // 'dir' => 0755, + // 'file' => 0644, + ], + + /* + |-------------------------------------------------------------------------- + | Remote Temporary Disk + |-------------------------------------------------------------------------- + | + | When dealing with a multi server setup with queues in which you + | cannot rely on having a shared local temporary path, you might + | want to store the temporary file on a shared disk. During the + | queue executing, we'll retrieve the temporary file from that + | location instead. When left to null, it will always use + | the local path. This setting only has effect when using + | in conjunction with queued imports and exports. + | + */ + 'remote_disk' => null, + 'remote_prefix' => null, + + /* + |-------------------------------------------------------------------------- + | Force Resync + |-------------------------------------------------------------------------- + | + | When dealing with a multi server setup as above, it's possible + | for the clean up that occurs after entire queue has been run to only + | cleanup the server that the last AfterImportJob runs on. The rest of the server + | would still have the local temporary file stored on it. In this case your + | local storage limits can be exceeded and future imports won't be processed. + | To mitigate this you can set this config value to be true, so that after every + | queued chunk is processed the local temporary file is deleted on the server that + | processed it. + | + */ + 'force_resync_remote' => null, + ], +]; From 76653c447a788c9d3de6fa60bcbb4f3761665575 Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Sat, 2 Aug 2025 09:05:12 +0330 Subject: [PATCH 5/5] delete excel module --- Dockerfile | 24 +- bootstrap/providers.php | 1 - composer.json | 1 - composer.lock | 595 +--------------------------------------- config/excel.php | 380 ------------------------- 5 files changed, 13 insertions(+), 988 deletions(-) delete mode 100644 config/excel.php diff --git a/Dockerfile b/Dockerfile index 6825188..afd3059 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM docker.arvancloud.ir/php:8.3-fpm-alpine3.21 +FROM docker.arvancloud.ir/php:8.3-fpm-alpine3.21 -# Install common php extension dependencies +# Install common PHP extension dependencies RUN apk update && apk add --no-cache \ bash \ nano \ @@ -8,13 +8,14 @@ RUN apk update && apk add --no-cache \ libpng \ libpng-dev \ libjpeg-turbo-dev \ - libwebp \ + freetype-dev \ libwebp-dev \ libxml2-dev \ unzip \ libzip-dev \ libpq-dev \ - && docker-php-ext-install pdo_pgsql + && docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ + && docker-php-ext-install pdo_pgsql gd zip # Set the working directory WORKDIR /var/www/laravel @@ -22,13 +23,12 @@ COPY . . RUN chmod -R 777 /var/www/laravel/storage /var/www/laravel/bootstrap/cache - -# install composer +# Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer -# Set the default command to run php-fpm -CMD composer install;\ - php artisan key:generate;\ - php artisan migrate ;\ - php artisan db:seed;\ - php-fpm +# Default command +CMD composer install \ + && php artisan key:generate \ + && php artisan migrate \ + && php artisan db:seed \ + && php-fpm diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 5d11af9..dbaa61a 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -5,5 +5,4 @@ return [ App\Providers\DataTableServiceProvider::class, App\Providers\FileServiceProvider::class, App\Providers\TelescopeServiceProvider::class, - Maatwebsite\Excel\ExcelServiceProvider::class, ]; diff --git a/composer.json b/composer.json index 93db14c..046b61e 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ "laravel/sanctum": "^4.0", "laravel/telescope": "^5.7", "laravel/tinker": "^2.10.1", - "maatwebsite/excel": "^3.1", "spatie/laravel-permission": "^6.17" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 806c95d..6eff47c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8238c006d65780b3b7c4e5059ede9197", + "content-hash": "8eb5ac276d904be6e4f6bd9ca7aa7b2f", "packages": [ { "name": "brick/math", @@ -135,166 +135,6 @@ ], "time": "2024-02-09T16:56:22+00:00" }, - { - "name": "composer/pcre", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", - "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<1.11.10" - }, - "require-dev": { - "phpstan/phpstan": "^1.12 || ^2", - "phpstan/phpstan-strict-rules": "^1 || ^2", - "phpunit/phpunit": "^8 || ^9" - }, - "type": "library", - "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] - }, - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2024-11-12T16:29:46+00:00" - }, - { - "name": "composer/semver", - "version": "3.4.3", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.11", - "symfony/phpunit-bridge": "^3 || ^7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2024-09-19T14:15:21+00:00" - }, { "name": "dflydev/dot-access-data", "version": "v3.0.3", @@ -725,67 +565,6 @@ ], "time": "2025-03-06T22:45:56+00:00" }, - { - "name": "ezyang/htmlpurifier", - "version": "v4.18.0", - "source": { - "type": "git", - "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "cb56001e54359df7ae76dc522d08845dc741621b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", - "reference": "cb56001e54359df7ae76dc522d08845dc741621b", - "shasum": "" - }, - "require": { - "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" - }, - "require-dev": { - "cerdic/css-tidy": "^1.7 || ^2.0", - "simpletest/simpletest": "dev-master" - }, - "suggest": { - "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", - "ext-bcmath": "Used for unit conversion and imagecrash protection", - "ext-iconv": "Converts text to and from non-UTF-8 encodings", - "ext-tidy": "Used for pretty-printing HTML" - }, - "type": "library", - "autoload": { - "files": [ - "library/HTMLPurifier.composer.php" - ], - "psr-0": { - "HTMLPurifier": "library/" - }, - "exclude-from-classmap": [ - "/library/HTMLPurifier/Language/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Edward Z. Yang", - "email": "admin@htmlpurifier.org", - "homepage": "http://ezyang.com" - } - ], - "description": "Standards compliant HTML filter written in PHP", - "homepage": "http://htmlpurifier.org/", - "keywords": [ - "html" - ], - "support": { - "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" - }, - "time": "2024-11-01T03:51:45+00:00" - }, { "name": "fruitcake/php-cors", "version": "v1.3.0", @@ -2578,272 +2357,6 @@ ], "time": "2025-04-12T22:26:52+00:00" }, - { - "name": "maatwebsite/excel", - "version": "3.1.64", - "source": { - "type": "git", - "url": "https://github.com/SpartnerNL/Laravel-Excel.git", - "reference": "e25d44a2d91da9179cd2d7fec952313548597a79" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/e25d44a2d91da9179cd2d7fec952313548597a79", - "reference": "e25d44a2d91da9179cd2d7fec952313548597a79", - "shasum": "" - }, - "require": { - "composer/semver": "^3.3", - "ext-json": "*", - "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0", - "php": "^7.0||^8.0", - "phpoffice/phpspreadsheet": "^1.29.9", - "psr/simple-cache": "^1.0||^2.0||^3.0" - }, - "require-dev": { - "laravel/scout": "^7.0||^8.0||^9.0||^10.0", - "orchestra/testbench": "^6.0||^7.0||^8.0||^9.0||^10.0", - "predis/predis": "^1.1" - }, - "type": "library", - "extra": { - "laravel": { - "aliases": { - "Excel": "Maatwebsite\\Excel\\Facades\\Excel" - }, - "providers": [ - "Maatwebsite\\Excel\\ExcelServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Maatwebsite\\Excel\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Patrick Brouwers", - "email": "patrick@spartner.nl" - } - ], - "description": "Supercharged Excel exports and imports in Laravel", - "keywords": [ - "PHPExcel", - "batch", - "csv", - "excel", - "export", - "import", - "laravel", - "php", - "phpspreadsheet" - ], - "support": { - "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", - "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.64" - }, - "funding": [ - { - "url": "https://laravel-excel.com/commercial-support", - "type": "custom" - }, - { - "url": "https://github.com/patrickbrouwers", - "type": "github" - } - ], - "time": "2025-02-24T11:12:50+00:00" - }, - { - "name": "maennchen/zipstream-php", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/maennchen/ZipStream-PHP.git", - "reference": "9712d8fa4cdf9240380b01eb4be55ad8dcf71416" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/9712d8fa4cdf9240380b01eb4be55ad8dcf71416", - "reference": "9712d8fa4cdf9240380b01eb4be55ad8dcf71416", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-zlib": "*", - "php-64bit": "^8.3" - }, - "require-dev": { - "brianium/paratest": "^7.7", - "ext-zip": "*", - "friendsofphp/php-cs-fixer": "^3.16", - "guzzlehttp/guzzle": "^7.5", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.5", - "phpunit/phpunit": "^12.0", - "vimeo/psalm": "^6.0" - }, - "suggest": { - "guzzlehttp/psr7": "^2.4", - "psr/http-message": "^2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "ZipStream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paul Duncan", - "email": "pabs@pablotron.org" - }, - { - "name": "Jonatan Männchen", - "email": "jonatan@maennchen.ch" - }, - { - "name": "Jesse Donat", - "email": "donatj@gmail.com" - }, - { - "name": "András Kolesár", - "email": "kolesar@kolesar.hu" - } - ], - "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", - "keywords": [ - "stream", - "zip" - ], - "support": { - "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.2.0" - }, - "funding": [ - { - "url": "https://github.com/maennchen", - "type": "github" - } - ], - "time": "2025-07-17T11:15:13+00:00" - }, - { - "name": "markbaker/complex", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", - "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", - "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Complex\\": "classes/src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Baker", - "email": "mark@lange.demon.co.uk" - } - ], - "description": "PHP Class for working with complex numbers", - "homepage": "https://github.com/MarkBaker/PHPComplex", - "keywords": [ - "complex", - "mathematics" - ], - "support": { - "issues": "https://github.com/MarkBaker/PHPComplex/issues", - "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" - }, - "time": "2022-12-06T16:21:08+00:00" - }, - { - "name": "markbaker/matrix", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/MarkBaker/PHPMatrix.git", - "reference": "728434227fe21be27ff6d86621a1b13107a2562c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", - "reference": "728434227fe21be27ff6d86621a1b13107a2562c", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", - "phpcompatibility/php-compatibility": "^9.3", - "phpdocumentor/phpdocumentor": "2.*", - "phploc/phploc": "^4.0", - "phpmd/phpmd": "2.*", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "sebastian/phpcpd": "^4.0", - "squizlabs/php_codesniffer": "^3.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Matrix\\": "classes/src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Baker", - "email": "mark@demon-angel.eu" - } - ], - "description": "PHP Class for working with matrices", - "homepage": "https://github.com/MarkBaker/PHPMatrix", - "keywords": [ - "mathematics", - "matrix", - "vector" - ], - "support": { - "issues": "https://github.com/MarkBaker/PHPMatrix/issues", - "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" - }, - "time": "2022-12-02T22:17:43+00:00" - }, { "name": "monolog/monolog", "version": "3.9.0", @@ -3346,112 +2859,6 @@ ], "time": "2024-11-21T10:39:51+00:00" }, - { - "name": "phpoffice/phpspreadsheet", - "version": "1.29.12", - "source": { - "type": "git", - "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "7c06eed662cce7ecab88f6f9f7626b443f5285df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/7c06eed662cce7ecab88f6f9f7626b443f5285df", - "reference": "7c06eed662cce7ecab88f6f9f7626b443f5285df", - "shasum": "" - }, - "require": { - "composer/pcre": "^1||^2||^3", - "ext-ctype": "*", - "ext-dom": "*", - "ext-fileinfo": "*", - "ext-gd": "*", - "ext-iconv": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-xml": "*", - "ext-xmlreader": "*", - "ext-xmlwriter": "*", - "ext-zip": "*", - "ext-zlib": "*", - "ezyang/htmlpurifier": "^4.15", - "maennchen/zipstream-php": "^2.1 || ^3.0", - "markbaker/complex": "^3.0", - "markbaker/matrix": "^3.0", - "php": "^7.4 || ^8.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-main", - "dompdf/dompdf": "^1.0 || ^2.0 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "^10.3", - "mpdf/mpdf": "^8.1.1", - "phpcompatibility/php-compatibility": "^9.3", - "phpstan/phpstan": "^1.1", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0", - "squizlabs/php_codesniffer": "^3.7", - "tecnickcom/tcpdf": "^6.5" - }, - "suggest": { - "dompdf/dompdf": "Option for rendering PDF with PDF Writer", - "ext-intl": "PHP Internationalization Functions", - "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", - "mpdf/mpdf": "Option for rendering PDF with PDF Writer", - "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" - }, - "type": "library", - "autoload": { - "psr-4": { - "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maarten Balliauw", - "homepage": "https://blog.maartenballiauw.be" - }, - { - "name": "Mark Baker", - "homepage": "https://markbakeruk.net" - }, - { - "name": "Franck Lefevre", - "homepage": "https://rootslabs.net" - }, - { - "name": "Erik Tilt" - }, - { - "name": "Adrien Crivelli" - } - ], - "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", - "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", - "keywords": [ - "OpenXML", - "excel", - "gnumeric", - "ods", - "php", - "spreadsheet", - "xls", - "xlsx" - ], - "support": { - "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.12" - }, - "time": "2025-07-23T04:40:30+00:00" - }, { "name": "phpoption/phpoption", "version": "1.9.3", diff --git a/config/excel.php b/config/excel.php deleted file mode 100644 index c1fd34a..0000000 --- a/config/excel.php +++ /dev/null @@ -1,380 +0,0 @@ - [ - - /* - |-------------------------------------------------------------------------- - | Chunk size - |-------------------------------------------------------------------------- - | - | When using FromQuery, the query is automatically chunked. - | Here you can specify how big the chunk should be. - | - */ - 'chunk_size' => 1000, - - /* - |-------------------------------------------------------------------------- - | Pre-calculate formulas during export - |-------------------------------------------------------------------------- - */ - 'pre_calculate_formulas' => false, - - /* - |-------------------------------------------------------------------------- - | Enable strict null comparison - |-------------------------------------------------------------------------- - | - | When enabling strict null comparison empty cells ('') will - | be added to the sheet. - */ - 'strict_null_comparison' => false, - - /* - |-------------------------------------------------------------------------- - | CSV Settings - |-------------------------------------------------------------------------- - | - | Configure e.g. delimiter, enclosure and line ending for CSV exports. - | - */ - 'csv' => [ - 'delimiter' => ',', - 'enclosure' => '"', - 'line_ending' => PHP_EOL, - 'use_bom' => false, - 'include_separator_line' => false, - 'excel_compatibility' => false, - 'output_encoding' => '', - 'test_auto_detect' => true, - ], - - /* - |-------------------------------------------------------------------------- - | Worksheet properties - |-------------------------------------------------------------------------- - | - | Configure e.g. default title, creator, subject,... - | - */ - 'properties' => [ - 'creator' => '', - 'lastModifiedBy' => '', - 'title' => '', - 'description' => '', - 'subject' => '', - 'keywords' => '', - 'category' => '', - 'manager' => '', - 'company' => '', - ], - ], - - 'imports' => [ - - /* - |-------------------------------------------------------------------------- - | Read Only - |-------------------------------------------------------------------------- - | - | When dealing with imports, you might only be interested in the - | data that the sheet exists. By default we ignore all styles, - | however if you want to do some logic based on style data - | you can enable it by setting read_only to false. - | - */ - 'read_only' => true, - - /* - |-------------------------------------------------------------------------- - | Ignore Empty - |-------------------------------------------------------------------------- - | - | When dealing with imports, you might be interested in ignoring - | rows that have null values or empty strings. By default rows - | containing empty strings or empty values are not ignored but can be - | ignored by enabling the setting ignore_empty to true. - | - */ - 'ignore_empty' => false, - - /* - |-------------------------------------------------------------------------- - | Heading Row Formatter - |-------------------------------------------------------------------------- - | - | Configure the heading row formatter. - | Available options: none|slug|custom - | - */ - 'heading_row' => [ - 'formatter' => 'slug', - ], - - /* - |-------------------------------------------------------------------------- - | CSV Settings - |-------------------------------------------------------------------------- - | - | Configure e.g. delimiter, enclosure and line ending for CSV imports. - | - */ - 'csv' => [ - 'delimiter' => null, - 'enclosure' => '"', - 'escape_character' => '\\', - 'contiguous' => false, - 'input_encoding' => Csv::GUESS_ENCODING, - ], - - /* - |-------------------------------------------------------------------------- - | Worksheet properties - |-------------------------------------------------------------------------- - | - | Configure e.g. default title, creator, subject,... - | - */ - 'properties' => [ - 'creator' => '', - 'lastModifiedBy' => '', - 'title' => '', - 'description' => '', - 'subject' => '', - 'keywords' => '', - 'category' => '', - 'manager' => '', - 'company' => '', - ], - - /* - |-------------------------------------------------------------------------- - | Cell Middleware - |-------------------------------------------------------------------------- - | - | Configure middleware that is executed on getting a cell value - | - */ - 'cells' => [ - 'middleware' => [ - //\Maatwebsite\Excel\Middleware\TrimCellValue::class, - //\Maatwebsite\Excel\Middleware\ConvertEmptyCellValuesToNull::class, - ], - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Extension detector - |-------------------------------------------------------------------------- - | - | Configure here which writer/reader type should be used when the package - | needs to guess the correct type based on the extension alone. - | - */ - 'extension_detector' => [ - 'xlsx' => Excel::XLSX, - 'xlsm' => Excel::XLSX, - 'xltx' => Excel::XLSX, - 'xltm' => Excel::XLSX, - 'xls' => Excel::XLS, - 'xlt' => Excel::XLS, - 'ods' => Excel::ODS, - 'ots' => Excel::ODS, - 'slk' => Excel::SLK, - 'xml' => Excel::XML, - 'gnumeric' => Excel::GNUMERIC, - 'htm' => Excel::HTML, - 'html' => Excel::HTML, - 'csv' => Excel::CSV, - 'tsv' => Excel::TSV, - - /* - |-------------------------------------------------------------------------- - | PDF Extension - |-------------------------------------------------------------------------- - | - | Configure here which Pdf driver should be used by default. - | Available options: Excel::MPDF | Excel::TCPDF | Excel::DOMPDF - | - */ - 'pdf' => Excel::DOMPDF, - ], - - /* - |-------------------------------------------------------------------------- - | Value Binder - |-------------------------------------------------------------------------- - | - | PhpSpreadsheet offers a way to hook into the process of a value being - | written to a cell. In there some assumptions are made on how the - | value should be formatted. If you want to change those defaults, - | you can implement your own default value binder. - | - | Possible value binders: - | - | [x] Maatwebsite\Excel\DefaultValueBinder::class - | [x] PhpOffice\PhpSpreadsheet\Cell\StringValueBinder::class - | [x] PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder::class - | - */ - 'value_binder' => [ - 'default' => Maatwebsite\Excel\DefaultValueBinder::class, - ], - - 'cache' => [ - /* - |-------------------------------------------------------------------------- - | Default cell caching driver - |-------------------------------------------------------------------------- - | - | By default PhpSpreadsheet keeps all cell values in memory, however when - | dealing with large files, this might result into memory issues. If you - | want to mitigate that, you can configure a cell caching driver here. - | When using the illuminate driver, it will store each value in the - | cache store. This can slow down the process, because it needs to - | store each value. You can use the "batch" store if you want to - | only persist to the store when the memory limit is reached. - | - | Drivers: memory|illuminate|batch - | - */ - 'driver' => 'memory', - - /* - |-------------------------------------------------------------------------- - | Batch memory caching - |-------------------------------------------------------------------------- - | - | When dealing with the "batch" caching driver, it will only - | persist to the store when the memory limit is reached. - | Here you can tweak the memory limit to your liking. - | - */ - 'batch' => [ - 'memory_limit' => 60000, - ], - - /* - |-------------------------------------------------------------------------- - | Illuminate cache - |-------------------------------------------------------------------------- - | - | When using the "illuminate" caching driver, it will automatically use - | your default cache store. However if you prefer to have the cell - | cache on a separate store, you can configure the store name here. - | You can use any store defined in your cache config. When leaving - | at "null" it will use the default store. - | - */ - 'illuminate' => [ - 'store' => null, - ], - - /* - |-------------------------------------------------------------------------- - | Cache Time-to-live (TTL) - |-------------------------------------------------------------------------- - | - | The TTL of items written to cache. If you want to keep the items cached - | indefinitely, set this to null. Otherwise, set a number of seconds, - | a \DateInterval, or a callable. - | - | Allowable types: callable|\DateInterval|int|null - | - */ - 'default_ttl' => 10800, - ], - - /* - |-------------------------------------------------------------------------- - | Transaction Handler - |-------------------------------------------------------------------------- - | - | By default the import is wrapped in a transaction. This is useful - | for when an import may fail and you want to retry it. With the - | transactions, the previous import gets rolled-back. - | - | You can disable the transaction handler by setting this to null. - | Or you can choose a custom made transaction handler here. - | - | Supported handlers: null|db - | - */ - 'transactions' => [ - 'handler' => 'db', - 'db' => [ - 'connection' => null, - ], - ], - - 'temporary_files' => [ - - /* - |-------------------------------------------------------------------------- - | Local Temporary Path - |-------------------------------------------------------------------------- - | - | When exporting and importing files, we use a temporary file, before - | storing reading or downloading. Here you can customize that path. - | permissions is an array with the permission flags for the directory (dir) - | and the create file (file). - | - */ - 'local_path' => storage_path('framework/cache/laravel-excel'), - - /* - |-------------------------------------------------------------------------- - | Local Temporary Path Permissions - |-------------------------------------------------------------------------- - | - | Permissions is an array with the permission flags for the directory (dir) - | and the create file (file). - | If omitted the default permissions of the filesystem will be used. - | - */ - 'local_permissions' => [ - // 'dir' => 0755, - // 'file' => 0644, - ], - - /* - |-------------------------------------------------------------------------- - | Remote Temporary Disk - |-------------------------------------------------------------------------- - | - | When dealing with a multi server setup with queues in which you - | cannot rely on having a shared local temporary path, you might - | want to store the temporary file on a shared disk. During the - | queue executing, we'll retrieve the temporary file from that - | location instead. When left to null, it will always use - | the local path. This setting only has effect when using - | in conjunction with queued imports and exports. - | - */ - 'remote_disk' => null, - 'remote_prefix' => null, - - /* - |-------------------------------------------------------------------------- - | Force Resync - |-------------------------------------------------------------------------- - | - | When dealing with a multi server setup as above, it's possible - | for the clean up that occurs after entire queue has been run to only - | cleanup the server that the last AfterImportJob runs on. The rest of the server - | would still have the local temporary file stored on it. In this case your - | local storage limits can be exceeded and future imports won't be processed. - | To mitigate this you can set this config value to be true, so that after every - | queued chunk is processed the local temporary file is deleted on the server that - | processed it. - | - */ - 'force_resync_remote' => null, - ], -];