From d41e7773b76ea73f93ce713e4f918cf813e18f46 Mon Sep 17 00:00:00 2001 From: Hafidz Nasruddin Date: Wed, 18 Oct 2017 01:30:36 +0800 Subject: [PATCH] ChartJS as plugin (#141) * Added ChartJS as adminlte plugin * Added documentation for ChartJS usage --- README.md | 9 +++++++++ config/adminlte.php | 1 + resources/views/master.blade.php | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/README.md b/README.md index f74a3c2a..3b17989a 100644 --- a/README.md +++ b/README.md @@ -341,6 +341,15 @@ Also the [Select2](https://select2.github.io/) plugin is supported. If set to `t ] ``` +Also the [ChartJS](https://www.chartjs.org/) plugin is supported. If set to `true`, the necessary javascript CDN script tags will automatically be injected into the `adminlte::page.blade` file. + +```php +'plugins' => [ + 'datatables' => true, + 'chartjs' => true, +] +``` + ## 6. Translations diff --git a/config/adminlte.php b/config/adminlte.php index d847cde9..041a16b8 100644 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -219,5 +219,6 @@ 'plugins' => [ 'datatables' => true, 'select2' => true, + 'chartjs' => true, ], ]; diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php index bc5c3e92..1f577e3c 100644 --- a/resources/views/master.blade.php +++ b/resources/views/master.blade.php @@ -55,6 +55,11 @@ @endif +@if(config('adminlte.plugins.chartjs')) + + +@endif + @yield('adminlte_js')