diff --git a/app/Admin/Actions/EXporter/SalesMan.php b/app/Admin/Actions/EXporter/SalesMan.php new file mode 100644 index 0000000..c2a2f92 --- /dev/null +++ b/app/Admin/Actions/EXporter/SalesMan.php @@ -0,0 +1,118 @@ +_name = $name; + $this->_option = $option; + } + + public function array(): array + { + $result[] = [ + '懒ID', + '拓展员', + '服务站点', + '站点地址', + '绑定用户数', + $this->_name.'下单人数', + $this->_name.'订单数', + $this->_name.'订单金额', + ]; + $res = $this->getSaleMan(-30); + foreach ($res as $value){ + $item =[]; + $item[] = $value['person_id']; + $item[] = $value['nick_name']; + $item[] = $value['name']; + $item[] = $value['address']; + $item[] = $value['user_num']??0; + $item[] = $value['order_user_num']??0; + $item[] = $value['order_num']??0; + $item[] = $value['order_amount']??0; + $result[] = $item; + } + return $result; + } + + /** + * 获取拓展员 + */ + public function getSaleMan($option) + { + $data = LanzuCsInfo::select( + DB::raw('count("lanzu_cs_info.person_id") as total'), + DB::raw('group_concat(lanzu_cs_info.admin_user_id) as admin_user_id'), + DB::raw('group_concat(rb.user_id) as user_id'), + 'lanzu_cs_info.person_id', 'lanzu_user.nick_name') + ->groupBy('lanzu_cs_info.person_id') + ->leftJoin('lanzu_user', 'lanzu_user.id', 'lanzu_cs_info.person_id') + ->leftJoin('lanzu_user_relation_bind as rb', 'rb.source_id', 'lanzu_cs_info.admin_user_id') + ->where('lanzu_cs_info.person_id', '>', 0)->get()->toArray(); + $result = []; + foreach ($data as $key => $value) { + $value['admin_user_id'] = array_unique(explode(',', $value['admin_user_id'])); + $result = $this->csDetail($value['admin_user_id'], $this->_option, $value['nick_name'], $result); + } + return $result; + } + + /** + * 获取站点详情 + */ + public function csDetail($adminUid, $option, $nickName, $result) + { + $data = modelCsInfo::whereIn('admin_user_id', $adminUid) + ->get()->toArray(); + foreach ($data as &$value) { + //>>1.获取绑定后下过单的用户 + $value['user_num'] = LanzuUserRelationBind::where('source_id', $value['admin_user_id'])->count(); + $uid = Order::getUserOrder($value['admin_user_id']); + //>>2.获取订单数据 + $value['order_user_num'] = Order::getOrderData([ + 'user_type' => 'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type' => 'count_user',//取什么数据 data_type 数据类型 + 'market_id' => '',//取哪个市场数据 + 'condition' => 1,//取数据维度 condition + 'user_ids' => $uid ? $uid : null + ], $option);//下单人数 + $value['order_num'] = Order::getOrderData([ + 'user_type' => 'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type' => 'number',//取什么数据 data_type 数据类型 + 'market_id' => '',//取哪个市场数据 + 'condition' => 1,//取数据维度 condition + 'user_ids' => $uid ? $uid : null + ], $option);//订单数 + $value['order_amount'] = Order::getOrderData([ + 'user_type' => 'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type' => 'amount',//取什么数据 data_type 数据类型 + 'market_id' => '',//取哪个市场数据 + 'condition' => 1,//取数据维度 condition + 'user_ids' => $uid ? $uid : null + ], $option);//订单金额 + $value['nick_name'] = $nickName; + $result[] = $value; + } + + return $result; + } +} diff --git a/app/Admin/Actions/Tools/SalesmanOption.php b/app/Admin/Actions/Tools/SalesmanOption.php index 2d463ad..3b18325 100644 --- a/app/Admin/Actions/Tools/SalesmanOption.php +++ b/app/Admin/Actions/Tools/SalesmanOption.php @@ -28,6 +28,7 @@ JS; 'yesterday' => '昨日', 'week' => '本周', 'month' => '本月', + 'last_month' => '上月', ]; $data = [ @@ -35,6 +36,7 @@ JS; 'yesterday' => '-1', 'week' => 'w', 'month' => '30', + 'last_month' => '-30', ]; foreach ($data as $key=>$value){ diff --git a/app/Admin/Controllers/v3/Salesman.php b/app/Admin/Controllers/v3/Salesman.php index 58e251c..37b5baa 100644 --- a/app/Admin/Controllers/v3/Salesman.php +++ b/app/Admin/Controllers/v3/Salesman.php @@ -7,10 +7,13 @@ namespace App\Admin\Controllers\v3; use App\Admin\Actions\Lazy\CsInfo; use App\Admin\Actions\Tools\SalesmanOption; use App\Admin\Actions\Tools\SalesmanOptionCopy; +use App\Http\Controllers\TestController; +use App\Models\LanzuMarket; use App\Models\v3\SalesmanData; use Dcat\Admin\Controllers\AdminController; use Dcat\Admin\Grid; use Dcat\Admin\Widgets\Modal; +use Maatwebsite\Excel\Facades\Excel; class Salesman extends AdminController { @@ -38,24 +41,26 @@ class Salesman extends AdminController } else { return Grid::make(new \App\Admin\Repositories\v3\Salesman(), function (Grid $grid) { $grid->tools(new SalesmanOption()); - $name = request()->get('name')??'今日'; - $option = request()->get('option'); + $name = request()->get('name') ?? '今日'; + $option = request()->get('option') ?? 1; $grid->paginate(10); + $grid->tools(" 导出 "); + $grid->export(); $grid->column('person_id', '懒ID'); $grid->column('nick_name', '拓展员'); $grid->column('total', '社区总数'); - $grid->column('user_id','绑定用户数')->display(function ($uid){ - if ($uid){ - return count(explode(',',$uid)); + $grid->column('user_id', '绑定用户数')->display(function ($uid) { + if ($uid) { + return count(explode(',', $uid)); } return 0; }); //$grid->column('order_user_num', $name.'下单人数'); - $grid->column('order_num', $name.'订单数'); - $grid->column('order_amount', $name.'成交额'); - $grid->actions(function (Grid\Displayers\Actions $actions)use ($name,$option){ + $grid->column('order_num', $name . '订单数'); + $grid->column('order_amount', $name . '成交额'); + $grid->actions(function (Grid\Displayers\Actions $actions) use ($name, $option) { $row = $actions->row->toArray(); - $actions->append(new \App\Admin\Extensions\Salesman($row['admin_user_id'],$name,$option,'详情')); + $actions->append(new \App\Admin\Extensions\Salesman($row['admin_user_id'], $name, $option, '详情')); }); $grid->disableCreateButton(); @@ -69,4 +74,13 @@ class Salesman extends AdminController } } + + public function export() + { + $name = request()->get('name'); + $option = request()->get('option'); + return Excel::download(new \App\Admin\Actions\Exporter\SalesMan($option,$name), $name.'拓展员报表.xlsx'); + } + + } diff --git a/app/Admin/Repositories/v3/CsInfo.php b/app/Admin/Repositories/v3/CsInfo.php index 012776f..2c79c74 100644 --- a/app/Admin/Repositories/v3/CsInfo.php +++ b/app/Admin/Repositories/v3/CsInfo.php @@ -16,10 +16,10 @@ class CsInfo extends EloquentRepository { $adminUid= request()->get('admin_user_id'); $option= request()->get('option'); + //获取服务站点 $data = modelCsInfo::whereIn('admin_user_id',$adminUid) ->paginate(10) ->toArray(); - foreach ($data['data'] as &$value){ //>>1.获取绑定后下过单的用户 $value['user_num'] = LanzuUserRelationBind::where('source_id',$value['admin_user_id'])->count(); diff --git a/app/Admin/routes.php b/app/Admin/routes.php index 1585774..5738177 100644 --- a/app/Admin/routes.php +++ b/app/Admin/routes.php @@ -17,6 +17,7 @@ Route::group([ $router->resource('/speaker', 'LanzuServiceSpeakerController'); $router->resource('/mp', 'LanzuMpInfoController'); $router->resource('/salesman', 'v3\Salesman'); + $router->any('/salesman_export', 'v3\Salesman@export'); $router->any('/mp_data', 'LanzuMpInfoController@showData'); $router->resource('/mm', 'LanzuMmInfoController'); $router->resource('/market', 'ImsCjdcMarketController'); diff --git a/app/Console/Commands/CsInfoStatis.php b/app/Console/Commands/CsInfoStatis.php new file mode 100644 index 0000000..e4e4c50 --- /dev/null +++ b/app/Console/Commands/CsInfoStatis.php @@ -0,0 +1,110 @@ +getSaleMan(); + dd($rows); + return 0; + } + + /** + * 获取拓展员 + */ + public function getSaleMan() + { + $data = LanzuCsInfo::select( + DB::raw('count("lanzu_cs_info.person_id") as total'), + DB::raw('group_concat(lanzu_cs_info.admin_user_id) as admin_user_id'), + DB::raw('group_concat(rb.user_id) as user_id'), + 'lanzu_cs_info.person_id','lanzu_user.nick_name') + ->groupBy('lanzu_cs_info.person_id') + ->leftJoin('lanzu_user','lanzu_user.id','lanzu_cs_info.person_id') + ->leftJoin('lanzu_user_relation_bind as rb','rb.source_id','lanzu_cs_info.admin_user_id') + ->where('lanzu_cs_info.person_id','>',0)->get()->toArray(); + foreach ($data as $key=>$value){ + $value['admin_user_id'] = array_unique(explode(',',$value['admin_user_id'])); + $row = $this->csDetail($value['admin_user_id'],-30); + dump($row); + } + } + + /** + * 获取站点详情 + */ + public function csDetail($adminUid,$option) + { + $data = modelCsInfo::whereIn('admin_user_id',$adminUid) + ->paginate(10) + ->toArray(); + foreach ($data['data'] as &$value){ + //>>1.获取绑定后下过单的用户 + $value['user_num'] = LanzuUserRelationBind::where('source_id',$value['admin_user_id'])->count(); + $uid = Order::getUserOrder($value['admin_user_id']); + //>>2.获取订单数据 + $value['order_user_num'] = Order::getOrderData([ + 'user_type'=>'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type'=>'count_user',//取什么数据 data_type 数据类型 + 'market_id'=>'',//取哪个市场数据 + 'condition'=>1,//取数据维度 condition + 'user_ids'=>$uid?$uid:null + ],$option);//下单人数 + $value['order_num'] = Order::getOrderData([ + 'user_type'=>'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type'=>'number',//取什么数据 data_type 数据类型 + 'market_id'=>'',//取哪个市场数据 + 'condition'=>1,//取数据维度 condition + 'user_ids'=>$uid?$uid:null + ],$option);//订单数 + $value['order_amount'] = Order::getOrderData([ + 'user_type'=>'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type'=>'amount',//取什么数据 data_type 数据类型 + 'market_id'=>'',//取哪个市场数据 + 'condition'=>1,//取数据维度 condition + 'user_ids'=>$uid?$uid:null + ],$option);//订单金额 + + } + dd($data); + } + +} diff --git a/app/Http/Controllers/TestController.php b/app/Http/Controllers/TestController.php index 3ba304b..4443378 100644 --- a/app/Http/Controllers/TestController.php +++ b/app/Http/Controllers/TestController.php @@ -10,42 +10,90 @@ use App\Http\Controllers\Controller as BaseController; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Storage; use App\Models\FinancialRecord; - - +use App\Admin\Common\Order; +use App\Models\LanzuCsInfo; +use App\Models\LanzuUserRelationBind; +use Illuminate\Console\Command; +use Illuminate\Support\Facades\DB; +use \App\Models\v3\CsInfo as modelCsInfo; +use Maatwebsite\Excel\Facades\Excel; class TestController extends BaseController { public function Test(){ - $client = Client::factory(env('RPC_SITE_HOST')); - $request = $client->request( - uniqid(), - '/separateaccounts/orderOnlineCompleted', - ['orderMainId' => 939,'userId'=>214]); - $response = $client->send($request); - dd($response->getBody()->getContents()); - return $response->getBody()->getContents(); + $this->getSaleMan(); } - public function testRpc() + /** + * 获取拓展员 + */ + public function getSaleMan() { - $client = Client::factory(env('RPC_SITE_HOST')); - $request = $client->request(uniqid(),'/alisms/sent', [ - 'phone' => 13481194554, - 'template'=>'SMS_201720790', - 'templateParams'=> json_encode(['name'=>"[DESION]",'money'=>'200元']), - ]); - $response = $client->send($request); - $result = json_decode($response->getBody()->getContents()); - if ($result->result->Code != 'OK') { - $msg = $result->result->Message; - Log::error('发送短信失败', ['Message'=>$msg]); + $data = LanzuCsInfo::select( + DB::raw('count("lanzu_cs_info.person_id") as total'), + DB::raw('group_concat(lanzu_cs_info.admin_user_id) as admin_user_id'), + DB::raw('group_concat(rb.user_id) as user_id'), + 'lanzu_cs_info.person_id','lanzu_user.nick_name') + ->groupBy('lanzu_cs_info.person_id') + ->leftJoin('lanzu_user','lanzu_user.id','lanzu_cs_info.person_id') + ->leftJoin('lanzu_user_relation_bind as rb','rb.source_id','lanzu_cs_info.admin_user_id') + ->where('lanzu_cs_info.person_id','>',0)->get()->toArray(); + $result = []; + foreach ($data as $key=>$value){ + $value['admin_user_id'] = array_unique(explode(',',$value['admin_user_id'])); + $result = $this->csDetail($value['admin_user_id'],-30,$value['nick_name'],$result); + } - return $response->getBody()->getContents(); + dd($result); } - public function testMap() + /** + * 获取站点详情 + */ + public function csDetail($adminUid,$option,$nickName,$result) { - $result = file_get_contents("https://apis.map.qq.com/ws/direction/v1/bicycling/?from=39.984042,116.307535&to=39.980869,116.325238&key=7NSBZ-ETU3O-CW6WN-S3YM5-KERR5-RQBHS"); - return $result; + $data = modelCsInfo::whereIn('admin_user_id',$adminUid) + ->get(); + foreach ($data as &$value){ + $value->nick_name = $nickName; + //>>1.获取绑定后下过单的用户 + $value->user_num = LanzuUserRelationBind::where('source_id',$value->admin_user_id)->count(); + $uid = Order::getUserOrder($value->admin_user_id); + //>>2.获取订单数据 + $value->order_user_num = Order::getOrderData([ + 'user_type'=>'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type'=>'count_user',//取什么数据 data_type 数据类型 + 'market_id'=>'',//取哪个市场数据 + 'condition'=>1,//取数据维度 condition + 'user_ids'=>$uid?$uid:null + ],$option);//下单人数 + $value->order_num = Order::getOrderData([ + 'user_type'=>'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type'=>'number',//取什么数据 data_type 数据类型 + 'market_id'=>'',//取哪个市场数据 + 'condition'=>1,//取数据维度 condition + 'user_ids'=>$uid?$uid:null + ],$option);//订单数 + $value->order_amount = Order::getOrderData([ + 'user_type'=>'lanzu_biz',//谁取数据 user_type 用户类型 + 'data_type'=>'amount',//取什么数据 data_type 数据类型 + 'market_id'=>'',//取哪个市场数据 + 'condition'=>1,//取数据维度 condition + 'user_ids'=>$uid?$uid:null + ],$option);//订单金额 + if ($result){ + $result[] = $value; + } + } + if ($result){ + return $result; + } + return $data; + } + + public static function export() + { + + return Excel::download(new \App\Admin\Actions\Exporter\SalesMan(), 'market.xlsx'); } } diff --git a/composer.json b/composer.json index 3853008..a821795 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ "laravel/framework": "^7.0", "laravel/scout": "^8.3", "laravel/tinker": "^2.0", + "maatwebsite/excel": "~3.1", "matchish/laravel-scout-elasticsearch": "^4.0", "overtrue/laravel-wechat": "~5.0" }, diff --git a/composer.lock b/composer.lock index 90ccb0a..fa498bb 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": "854b617e7a44365e7cb38038beee8645", + "content-hash": "758d8ed34a07a48e7de06f4b5128a7ad", "packages": [ { "name": "adbario/php-dot-notation", @@ -253,6 +253,81 @@ ], "time": "2019-12-24T22:41:47+00:00" }, + { + "name": "box/spout", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/box/spout.git", + "reference": "7964dadc2128f3a00ffa393395b618ea115c8032" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/box/spout/zipball/7964dadc2128f3a00ffa393395b618ea115c8032", + "reference": "7964dadc2128f3a00ffa393395b618ea115c8032", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-xmlreader": "*", + "ext-zip": "*", + "php": ">=7.1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2", + "phpunit/phpunit": "^7" + }, + "suggest": { + "ext-iconv": "To handle non UTF-8 CSV files (if \"php-intl\" is not already installed or is too limited)", + "ext-intl": "To handle non UTF-8 CSV files (if \"iconv\" is not already installed)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Box\\Spout\\": "src/Spout" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Adrien Loison", + "email": "adrien@box.com" + } + ], + "description": "PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way", + "homepage": "https://www.github.com/box/spout", + "keywords": [ + "OOXML", + "csv", + "excel", + "memory", + "odf", + "ods", + "office", + "open", + "php", + "read", + "scale", + "spreadsheet", + "stream", + "write", + "xlsx" + ], + "time": "2019-12-02T21:21:41+00:00" + }, { "name": "brick/math", "version": "0.9.1", @@ -303,12 +378,6 @@ "brick", "math" ], - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/brick/math", - "type": "tidelift" - } - ], "time": "2020-08-18T23:57:15+00:00" }, { @@ -427,6 +496,67 @@ ], "time": "2017-06-12T01:10:27+00:00" }, + { + "name": "dcat/easy-excel", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/jqhph/easy-excel.git", + "reference": "badb6734420a77263f82e35ac218d2b4223fe833" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jqhph/easy-excel/zipball/badb6734420a77263f82e35ac218d2b4223fe833", + "reference": "badb6734420a77263f82e35ac218d2b4223fe833", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "box/spout": "~3", + "league/flysystem": "~1", + "php": ">=7.1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2", + "phpunit/phpunit": "~7|~8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dcat\\EasyExcel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "jqh", + "email": "841324345@qq.com" + } + ], + "description": "使用简单实用的语义化接口快速读写Excel文件", + "homepage": "https://github.com/jqhph/easy-excel", + "keywords": [ + "box spout", + "csv", + "easy excel", + "excel", + "ods", + "office", + "read", + "spreadsheet", + "stream", + "xlsx" + ], + "time": "2020-09-21T02:19:34+00:00" + }, { "name": "dcat/laravel-admin", "version": "1.7.4", @@ -725,20 +855,6 @@ "sqlserver", "sqlsrv" ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", - "type": "tidelift" - } - ], "time": "2020-09-12T21:20:41+00:00" }, { @@ -2300,32 +2416,6 @@ "md", "parser" ], - "funding": [ - { - "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", - "type": "custom" - }, - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/commonmark", - "type": "tidelift" - } - ], "time": "2020-09-13T14:44:46+00:00" }, { @@ -2417,12 +2507,6 @@ "sftp", "storage" ], - "funding": [ - { - "url": "https://offset.earth/frankdejonge", - "type": "other" - } - ], "time": "2020-08-23T07:39:11+00:00" }, { @@ -2470,17 +2554,320 @@ } ], "description": "Mime-type detection for Flysystem", - "funding": [ + "time": "2020-08-09T10:34:01+00:00" + }, + { + "name": "maatwebsite/excel", + "version": "3.1.23", + "source": { + "type": "git", + "url": "https://github.com/Maatwebsite/Laravel-Excel.git", + "reference": "b8145257f020635f374d2314ccd556674efcbfcb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/b8145257f020635f374d2314ccd556674efcbfcb", + "reference": "b8145257f020635f374d2314ccd556674efcbfcb", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0", + "php": "^7.0", + "phpoffice/phpspreadsheet": "^1.14" + }, + "require-dev": { + "orchestra/testbench": "^6.0", + "predis/predis": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maatwebsite\\Excel\\ExcelServiceProvider" + ], + "aliases": { + "Excel": "Maatwebsite\\Excel\\Facades\\Excel" + } + } + }, + "autoload": { + "psr-4": { + "Maatwebsite\\Excel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Patrick Brouwers", + "email": "patrick@maatwebsite.nl" + } + ], + "description": "Supercharged Excel exports and imports in Laravel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel", + "php", + "phpspreadsheet" + ], + "time": "2020-09-29T07:30:12+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "myclabs/php-enum": "^1.5", + "php": ">= 7.1", + "psr/http-message": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "ext-zip": "*", + "guzzlehttp/guzzle": ">= 6.3", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": ">= 7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, { - "url": "https://github.com/frankdejonge", - "type": "github" + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" }, { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" } ], - "time": "2020-08-09T10:34:01+00:00" + "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" + ], + "time": "2020-05-30T13:11:16+00:00" + }, + { + "name": "markbaker/complex", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "c3131244e29c08d44fefb49e0dd35021e9e39dd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/c3131244e29c08d44fefb49e0dd35021e9e39dd2", + "reference": "c3131244e29c08d44fefb49e0dd35021e9e39dd2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0|^5.0|^6.0|^7.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.0|^6.0|^7.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "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" + ], + "time": "2020-08-26T19:47:57+00:00" + }, + { + "name": "markbaker/matrix", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "182d44c3b2e3b063468f7481ae3ef71c69dc1409" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/182d44c3b2e3b063468f7481ae3ef71c69dc1409", + "reference": "182d44c3b2e3b063468f7481ae3ef71c69dc1409", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "dev-master", + "phploc/phploc": "^4", + "phpmd/phpmd": "dev-master", + "phpunit/phpunit": "^5.7|^6.0|7.0", + "sebastian/phpcpd": "^3.0", + "squizlabs/php_codesniffer": "^3.0@dev" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "time": "2020-08-28T19:41:55+00:00" }, { "name": "matchish/laravel-scout-elasticsearch", @@ -2546,12 +2933,6 @@ "scout", "search" ], - "funding": [ - { - "url": "https://www.patreon.com/matchish", - "type": "patreon" - } - ], "time": "2020-03-26T04:06:20+00:00" }, { @@ -2704,6 +3085,58 @@ ], "time": "2020-07-31T21:01:56+00:00" }, + { + "name": "myclabs/php-enum", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "time": "2020-02-14T08:15:52+00:00" + }, { "name": "nesbot/carbon", "version": "2.39.2", @@ -2787,16 +3220,6 @@ "datetime", "time" ], - "funding": [ - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], "time": "2020-09-10T12:16:42+00:00" }, { @@ -3099,12 +3522,6 @@ "wechat", "weibo" ], - "funding": [ - { - "url": "https://www.patreon.com/overtrue", - "type": "patreon" - } - ], "time": "2020-09-14T08:34:23+00:00" }, { @@ -3178,20 +3595,6 @@ "weixin", "weixin-sdk" ], - "funding": [ - { - "url": "https://www.easywechat.com/img/pay/wechat.jpg", - "type": "custom" - }, - { - "url": "https://github.com/overtrue", - "type": "github" - }, - { - "url": "https://www.patreon.com/overtrue", - "type": "patreon" - } - ], "time": "2020-09-09T09:07:36+00:00" }, { @@ -3245,6 +3648,108 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.14.1", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "2383aad5689778470491581442aab38cec41bf1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/2383aad5689778470491581442aab38cec41bf1d", + "reference": "2383aad5689778470491581442aab38cec41bf1d", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "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": "*", + "maennchen/zipstream-php": "^2.1", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.2", + "php": "^7.2", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.5", + "friendsofphp/php-cs-fixer": "^2.16", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^8.0", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^8.5", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.3" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/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" + ], + "time": "2020-07-19T09:51:35+00:00" + }, { "name": "phpoption/phpoption", "version": "1.7.5", @@ -3354,26 +3859,133 @@ "email": "fabien@symfony.com" } ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "https://pimple.symfony.com", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2020-03-03T09:12:48+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ + "PSR-11", "container", - "dependency injection" + "container-interface", + "container-interop", + "psr" ], - "time": "2020-03-03T09:12:48+00:00" + "time": "2017-02-14T16:28:37+00:00" }, { - "name": "psr/cache", - "version": "1.0.1", + "name": "psr/event-dispatcher", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "", "mirrors": [ { @@ -3383,7 +3995,7 @@ ] }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", "extra": { @@ -3393,7 +4005,7 @@ }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "Psr\\EventDispatcher\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3406,26 +4018,26 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for caching libraries", + "description": "Standard interfaces for event handling.", "keywords": [ - "cache", + "events", "psr", - "psr-6" + "psr-14" ], - "time": "2016-08-06T20:24:11+00:00" + "time": "2019-01-08T18:20:26+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "psr/http-client", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", "shasum": "", "mirrors": [ { @@ -3435,7 +4047,8 @@ ] }, "require": { - "php": ">=5.3.0" + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -3445,7 +4058,7 @@ }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\Http\\Client\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3458,29 +4071,28 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "http", + "http-client", + "psr", + "psr-18" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2020-06-29T06:28:15+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "psr/http-factory", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "shasum": "", "mirrors": [ { @@ -3490,7 +4102,8 @@ ] }, "require": { - "php": ">=7.2.0" + "php": ">=7.0.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -3500,7 +4113,7 @@ }, "autoload": { "psr-4": { - "Psr\\EventDispatcher\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3513,13 +4126,18 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Standard interfaces for event handling.", + "description": "Common interfaces for PSR-7 HTTP message factories", "keywords": [ - "events", + "factory", + "http", + "message", "psr", - "psr-14" + "psr-17", + "psr-7", + "request", + "response" ], - "time": "2019-01-08T18:20:26+00:00" + "time": "2019-04-30T12:38:16+00:00" }, { "name": "psr/http-message", @@ -3875,12 +4493,6 @@ "queue", "set" ], - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - } - ], "time": "2020-09-10T20:58:17+00:00" }, { @@ -3968,12 +4580,6 @@ "identifier", "uuid" ], - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - } - ], "time": "2020-08-18T17:17:46+00:00" }, { @@ -4091,12 +4697,6 @@ "sort", "sortable" ], - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], "time": "2020-09-15T06:48:07+00:00" }, { @@ -4251,20 +4851,6 @@ "caching", "psr6" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-01T05:52:18+00:00" }, { @@ -4333,20 +4919,6 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-07T11:33:47+00:00" }, { @@ -4432,20 +5004,6 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-02T07:07:40+00:00" }, { @@ -4505,20 +5063,6 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-05-20T17:43:50+00:00" }, { @@ -4575,20 +5119,6 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-07T11:33:47+00:00" }, { @@ -4657,20 +5187,6 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-12T08:45:47+00:00" }, { @@ -4734,20 +5250,6 @@ ], "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-17T10:01:29+00:00" }, { @@ -4826,20 +5328,6 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-13T14:19:42+00:00" }, { @@ -4908,20 +5396,6 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-07T11:33:47+00:00" }, { @@ -4977,20 +5451,6 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-17T10:01:29+00:00" }, { @@ -5058,20 +5518,6 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-17T07:48:54+00:00" }, { @@ -5177,20 +5623,6 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-02T08:15:18+00:00" }, { @@ -5260,20 +5692,6 @@ "mime", "mime-type" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-17T10:01:29+00:00" }, { @@ -6030,20 +6448,6 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-07-23T08:36:24+00:00" }, { @@ -6114,20 +6518,6 @@ "psr-17", "psr-7" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-06-25T08:21:47+00:00" }, { @@ -6212,20 +6602,6 @@ "uri", "url" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-10T08:03:57+00:00" }, { @@ -6315,20 +6691,6 @@ ], "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-01T05:52:18+00:00" }, { @@ -6397,20 +6759,6 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-07T11:33:47+00:00" }, { @@ -6488,20 +6836,6 @@ "utf-8", "utf8" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-17T07:48:54+00:00" }, { @@ -6586,20 +6920,6 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-17T10:01:29+00:00" }, { @@ -6667,20 +6987,6 @@ "interoperability", "standards" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-09-07T11:33:47+00:00" }, { @@ -6763,20 +7069,6 @@ "debug", "dump" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-08-17T07:42:30+00:00" }, { @@ -6844,20 +7136,6 @@ "instantiate", "serialize" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-06-07T15:42:22+00:00" }, { @@ -7163,12 +7441,6 @@ "flare", "reporting" ], - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], "time": "2020-08-26T18:06:23+00:00" }, { @@ -8476,12 +8748,6 @@ "highlight.php", "syntax" ], - "funding": [ - { - "url": "https://github.com/allejo", - "type": "github" - } - ], "time": "2020-08-27T03:24:44+00:00" }, { @@ -9281,6 +9547,5 @@ "platform": { "php": "^7.2.5" }, - "platform-dev": [], - "plugin-api-version": "1.1.0" + "platform-dev": [] } diff --git a/config/app.php b/config/app.php index d3ae4d4..9e9f77b 100644 --- a/config/app.php +++ b/config/app.php @@ -176,6 +176,7 @@ return [ App\Providers\RouteServiceProvider::class, Iidestiny\LaravelFilesystemOss\OssStorageServiceProvider::class, //\Matchish\ScoutElasticSearch\ElasticSearchServiceProvider::class, + Maatwebsite\Excel\ExcelServiceProvider::class, ], /* @@ -227,6 +228,7 @@ return [ 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, + 'Excel' => Maatwebsite\Excel\Facades\Excel::class, ], diff --git a/config/excel.php b/config/excel.php new file mode 100644 index 0000000..c3199b9 --- /dev/null +++ b/config/excel.php @@ -0,0 +1,328 @@ + [ + + /* + |-------------------------------------------------------------------------- + | 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, + ], + + /* + |-------------------------------------------------------------------------- + | 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' => ',', + 'enclosure' => '"', + 'escape_character' => '\\', + 'contiguous' => false, + 'input_encoding' => 'UTF-8', + ], + + /* + |-------------------------------------------------------------------------- + | Worksheet properties + |-------------------------------------------------------------------------- + | + | Configure e.g. default title, creator, subject,... + | + */ + 'properties' => [ + 'creator' => '', + 'lastModifiedBy' => '', + 'title' => '', + 'description' => '', + 'subject' => '', + 'keywords' => '', + 'category' => '', + 'manager' => '', + 'company' => '', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | 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 a 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, + ], + ], + + /* + |-------------------------------------------------------------------------- + | 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', + ], + + '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. + | + */ + 'local_path' => storage_path('framework/laravel-excel'), + + /* + |-------------------------------------------------------------------------- + | 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, + ], +]; diff --git a/routes/web.php b/routes/web.php index 993b7a6..fa168f1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -18,6 +18,7 @@ Route::get('/', function(){ }); Route::get('/test', 'TestController@Test'); +Route::get('/export', 'TestController@export'); Route::any('/rpc', 'TestController@testRpc'); Route::any('/map', 'TestController@testMap'); Route::any('/add', 'Salesman@addData'); diff --git a/storage/framework/laravel-excel/laravel-excel-1yWRkHreLllX7MXKHlJPTMNfnVOwIGR1.xlsx b/storage/framework/laravel-excel/laravel-excel-1yWRkHreLllX7MXKHlJPTMNfnVOwIGR1.xlsx new file mode 100644 index 0000000..35402a0 Binary files /dev/null and b/storage/framework/laravel-excel/laravel-excel-1yWRkHreLllX7MXKHlJPTMNfnVOwIGR1.xlsx differ diff --git a/storage/framework/laravel-excel/laravel-excel-Uhbm2VWA7B4WTj6Pz5mKJostWKikQA0r.xlsx b/storage/framework/laravel-excel/laravel-excel-Uhbm2VWA7B4WTj6Pz5mKJostWKikQA0r.xlsx new file mode 100644 index 0000000..3cf045c Binary files /dev/null and b/storage/framework/laravel-excel/laravel-excel-Uhbm2VWA7B4WTj6Pz5mKJostWKikQA0r.xlsx differ diff --git a/storage/framework/laravel-excel/laravel-excel-Z3fdakI4WiO9DTZJeGSnKkdpltFKwwfU.xlsx b/storage/framework/laravel-excel/laravel-excel-Z3fdakI4WiO9DTZJeGSnKkdpltFKwwfU.xlsx new file mode 100644 index 0000000..fff7c73 Binary files /dev/null and b/storage/framework/laravel-excel/laravel-excel-Z3fdakI4WiO9DTZJeGSnKkdpltFKwwfU.xlsx differ diff --git a/storage/framework/laravel-excel/laravel-excel-eYPrHax2rrY0IrKCXdV7CFDP20SFhxoY.xlsx b/storage/framework/laravel-excel/laravel-excel-eYPrHax2rrY0IrKCXdV7CFDP20SFhxoY.xlsx new file mode 100644 index 0000000..f08a08c Binary files /dev/null and b/storage/framework/laravel-excel/laravel-excel-eYPrHax2rrY0IrKCXdV7CFDP20SFhxoY.xlsx differ diff --git a/storage/framework/laravel-excel/laravel-excel-seIr1cl908lcHEofP6DhBYv8QFo8cvVK.xlsx b/storage/framework/laravel-excel/laravel-excel-seIr1cl908lcHEofP6DhBYv8QFo8cvVK.xlsx new file mode 100644 index 0000000..09b24e7 Binary files /dev/null and b/storage/framework/laravel-excel/laravel-excel-seIr1cl908lcHEofP6DhBYv8QFo8cvVK.xlsx differ diff --git a/stubs/export.model.stub b/stubs/export.model.stub new file mode 100644 index 0000000..af6f6b8 --- /dev/null +++ b/stubs/export.model.stub @@ -0,0 +1,17 @@ +