├── .gitignore
├── LICENSE
├── README.md
├── composer.json
├── resources
├── assets
│ └── echarts.min.js
└── views
│ ├── index.blade.php
│ └── index1.blade.php
└── src
├── ECharts.php
├── EChartsServiceProvider.php
└── Http
└── Controllers
└── EChartsController.php
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | phpunit.phar
3 | /vendor
4 | composer.phar
5 | composer.lock
6 | *.project
7 | .idea/
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 缪汶臻 747512353@qq.com
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | laravel-admin-ext\Echarts图表
2 | ======
3 | 
4 | ## 安装
5 |
6 | ```
7 | $ composer require mwz747512353/laravel-admin-echarts
8 |
9 | $ php artisan vendor:publish --tag=laravel-admin-echarts
10 | ```
11 | ## 使用
12 | ```
13 | ECharts::content('index') //index为视图文件,也将用于图标初始化的id值
14 | ```
15 | 插件的安装以及调试请看index插件模板文件,具体配置使用方法请查看echarts官方文档
16 | ## 有问题反馈
17 | 在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流
18 |
19 | * 邮件(747512353#qq.com, 把#换成@)
20 | * QQ: 747512353
21 |
22 | ## 兴趣菜鸟交流群
23 | * QQ群:296031123
24 |
25 | License
26 | ------------
27 | Licensed under [The MIT License (MIT)](LICENSE).
28 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mwz747512353/laravel-admin-echarts",
3 | "description": "基于laravel-admin的echarts图表",
4 | "type": "library",
5 | "keywords": ["laravel-admin", "图表","echarts"],
6 | "homepage": "https://github.com/mwz747512353/laravelAdmin-echarts",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "WenZhen Miao",
11 | "email": "747512353qq.com"
12 | }
13 | ],
14 | "require": {
15 | "php": ">=7.0.0",
16 | "encore/laravel-admin": "~1.6"
17 | },
18 | "require-dev": {
19 | "phpunit/phpunit": "~6.0"
20 | },
21 | "autoload": {
22 | "psr-4": {
23 | "Encore\\ECharts\\": "src/"
24 | }
25 | },
26 | "extra": {
27 | "laravel": {
28 | "providers": [
29 | "Encore\\ECharts\\EChartsServiceProvider"
30 | ]
31 |
32 | }
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/resources/views/index.blade.php:
--------------------------------------------------------------------------------
1 | {!! $chart_html !!}
2 |
--------------------------------------------------------------------------------
/resources/views/index1.blade.php:
--------------------------------------------------------------------------------
1 | {!!$chart_html !!}
2 |
--------------------------------------------------------------------------------
/src/ECharts.php:
--------------------------------------------------------------------------------
1 | 加载中....
16 | EOF;
17 |
18 | return view('echarts::'.$option,['chart'=>$time,'chart_html'=>$html]);
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/src/EChartsServiceProvider.php:
--------------------------------------------------------------------------------
1 | views()) {
20 | $this->loadViewsFrom($views, 'echarts');
21 | }
22 |
23 | if ($this->app->runningInConsole() && $assets = $extension->assets()) {
24 | $this->publishes(
25 | [$assets => public_path('vendor\\laravel-admin-ext\\echarts')],
26 | 'laravel-admin-echarts'
27 | );
28 | }
29 | Admin::booting(function () {
30 | Admin::js('vendor/laravel-admin-ext/echarts/echarts.min.js');
31 | });
32 | }
33 | }
--------------------------------------------------------------------------------
/src/Http/Controllers/EChartsController.php:
--------------------------------------------------------------------------------
1 | header('Title')
14 | ->description('Description')
15 | ->body(view('echarts::index'));
16 | }
17 | }
--------------------------------------------------------------------------------