From c391a7d1281b98a0c4fb8983ccf4f37f50214f2e Mon Sep 17 00:00:00 2001 From: Haxorsprogramming Date: Mon, 4 Apr 2022 11:42:54 +0700 Subject: [PATCH] 'update' --- app/Http/Controllers/C_Dashboard.php | 6 +++ app/Http/Controllers/C_Laporan.php | 17 +++++++ app/Models/M_Pengujian.php | 8 +++ database/seeders/DatabaseSeeder.php | 2 +- resources/views/layout/headerApp.blade.php | 6 +-- resources/views/main/infoAplikasi.blade.php | 7 +++ .../views/main/laporan/laporanData.blade.php | 51 +++++++++++++++++++ routes/web.php | 8 ++- 8 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 app/Http/Controllers/C_Laporan.php create mode 100644 resources/views/main/infoAplikasi.blade.php create mode 100644 resources/views/main/laporan/laporanData.blade.php diff --git a/app/Http/Controllers/C_Dashboard.php b/app/Http/Controllers/C_Dashboard.php index c30879c..dbef365 100644 --- a/app/Http/Controllers/C_Dashboard.php +++ b/app/Http/Controllers/C_Dashboard.php @@ -15,6 +15,12 @@ public function berandaPage() $dr = ['status' => 'sukses']; return view('main.berandaPage'); } + + public function infoAplikasi() + { + return view('main.infoAplikasi'); + } + function setAwal() { $dataAwal = array(); diff --git a/app/Http/Controllers/C_Laporan.php b/app/Http/Controllers/C_Laporan.php new file mode 100644 index 0000000..c863ca2 --- /dev/null +++ b/app/Http/Controllers/C_Laporan.php @@ -0,0 +1,17 @@ + $dataPengujian]; + return view('main.laporan.laporanData', $dr); + } +} diff --git a/app/Models/M_Pengujian.php b/app/Models/M_Pengujian.php index 1815508..6a07665 100644 --- a/app/Models/M_Pengujian.php +++ b/app/Models/M_Pengujian.php @@ -4,6 +4,8 @@ use Illuminate\Database\Eloquent\Model; +use App\Models\M_Nilai_Kombinasi; + class M_Pengujian extends Model { protected $table = "tbl_pengujian"; @@ -14,4 +16,10 @@ class M_Pengujian extends Model 'min_supp', 'min_confidence' ]; + + public function totalPolaProduk($kdPengujian, $confidence) + { + return M_Nilai_Kombinasi::where('kd_pengujian', $kdPengujian) -> where('support', '>=', $confidence) -> count(); + } + } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 8555743..bffc677 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,7 +15,7 @@ public function run() { $this -> call([S_User::class, S_Kategori::class]); Artisan::call('importDataProduk'); - Artisan::call('createFakePenjualan tf=100'); + Artisan::call('createFakePenjualan tf=200'); // Artisan::call('importDataPenjualan'); } diff --git a/resources/views/layout/headerApp.blade.php b/resources/views/layout/headerApp.blade.php index cfa5f79..0978ca8 100644 --- a/resources/views/layout/headerApp.blade.php +++ b/resources/views/layout/headerApp.blade.php @@ -103,7 +103,7 @@