add visualisasi data
This commit is contained in:
parent
5a16da872a
commit
c382d25711
|
@ -69,7 +69,6 @@ public function pembagi(Request $request)
|
|||
$bobots = [];
|
||||
$hasil_max = [];
|
||||
$hasil_min = [];
|
||||
$d_plus = [];
|
||||
$preference = [];
|
||||
|
||||
$sum_of_altitude = 0;
|
||||
|
@ -78,8 +77,6 @@ public function pembagi(Request $request)
|
|||
$sum_of_ph_soil = 0;
|
||||
$sum_of_temperature = 0;
|
||||
$sum_of_humidity = 0;
|
||||
$plus = 0;
|
||||
$min = 0;
|
||||
|
||||
foreach ($kalkulasi as $data) {
|
||||
$sum_of_altitude += pow($data->altitude, 2);
|
||||
|
@ -97,7 +94,6 @@ public function pembagi(Request $request)
|
|||
$result5 = sqrt($sum_of_temperature);
|
||||
$result6 = sqrt($sum_of_humidity);
|
||||
|
||||
// Menggunakan array untuk menyimpan hasil
|
||||
$results['result1'] = $result1;
|
||||
$results['result2'] = $result2;
|
||||
$results['result3'] = $result3;
|
||||
|
@ -122,7 +118,6 @@ public function pembagi(Request $request)
|
|||
$bobot_temperature = ($data->temperature / $results['result5']) * $kriteria_temperature->bobot;
|
||||
$bobot_humidity = ($data->humidity / $results['result6']) * $kriteria_humidity->bobot;
|
||||
|
||||
// Simpan bobot ke dalam array
|
||||
$bobots[$data->id] = [
|
||||
'bobot_altitude' => $bobot_altitude,
|
||||
'bobot_rainfall' => $bobot_rainfall,
|
||||
|
@ -134,15 +129,12 @@ public function pembagi(Request $request)
|
|||
}
|
||||
|
||||
foreach ($kalkulasi as $data) {
|
||||
// Mendapatkan nilai kriteria yang sesuai untuk setiap variabel
|
||||
$hasil_altitude = Kriteria::where('description', 'cost')->first();
|
||||
$hasil_rainfall = Kriteria::where('description', 'benefit')->first();
|
||||
$hasil_solar_radiation = Kriteria::where('description', 'benefit')->first();
|
||||
$hasil_ph_soil = Kriteria::where('description', 'benefit')->first();
|
||||
$hasil_temperature = Kriteria::where('description', 'cost')->first();
|
||||
$hasil_humidity = Kriteria::where('description', 'benefit')->first();
|
||||
// Simpan hasil perhitungan maksimum (benefit) ke dalam array
|
||||
// Simpan hasil perhitungan maksimum (benefit) ke dalam array
|
||||
$hasil_max = [
|
||||
'bobot_altitude' => ($hasil_altitude->description == 'benefit') ? max(array_column($bobots, 'bobot_altitude')) : min(array_column($bobots, 'bobot_altitude')),
|
||||
'bobot_rainfall' => ($hasil_rainfall->description == 'cost') ? min(array_column($bobots, 'bobot_rainfall')) : max(array_column($bobots, 'bobot_rainfall')),
|
||||
|
@ -152,7 +144,6 @@ public function pembagi(Request $request)
|
|||
'bobot_humidity' => ($hasil_humidity->description == 'cost') ? min(array_column($bobots, 'bobot_humidity')) : max(array_column($bobots, 'bobot_humidity')),
|
||||
];
|
||||
|
||||
// Simpan hasil perhitungan minimum (cost) ke dalam array
|
||||
$hasil_min = [
|
||||
'bobot_altitude' => ($hasil_altitude->description == 'benefit') ? min(array_column($bobots, 'bobot_altitude')) : max(array_column($bobots, 'bobot_altitude')),
|
||||
'bobot_rainfall' => ($hasil_rainfall->description == 'cost') ? max(array_column($bobots, 'bobot_rainfall')) : min(array_column($bobots, 'bobot_rainfall')),
|
||||
|
@ -164,17 +155,10 @@ public function pembagi(Request $request)
|
|||
|
||||
|
||||
// Menghitung D+
|
||||
|
||||
$d_plus_values = [];
|
||||
|
||||
$d_min_values = [];
|
||||
|
||||
// Loop melalui setiap kecamatan
|
||||
foreach ($kalkulasi as $data) {
|
||||
// Perhitungan bobot untuk setiap variabel
|
||||
// ...
|
||||
|
||||
// Perhitungan D+ untuk setiap kecamatan
|
||||
$sum_of_squares = pow($hasil_max['bobot_altitude'] - $bobots[$data->id]['bobot_altitude'], 2) +
|
||||
pow($hasil_max['bobot_rainfall'] - $bobots[$data->id]['bobot_rainfall'], 2) +
|
||||
pow($hasil_max['bobot_solar_radiation'] - $bobots[$data->id]['bobot_solar_radiation'], 2) +
|
||||
|
@ -183,20 +167,10 @@ public function pembagi(Request $request)
|
|||
pow($hasil_max['bobot_humidity'] - $bobots[$data->id]['bobot_humidity'], 2);
|
||||
|
||||
$result_d_plus = sqrt($sum_of_squares);
|
||||
|
||||
// Simpan hasil perhitungan D+ untuk setiap kecamatan
|
||||
$d_plus_values[$data->id] = $result_d_plus;
|
||||
}
|
||||
|
||||
// Gunakan $d_plus_values sesuai kebutuhan di aplikasi Anda
|
||||
// dd($d_plus_values);
|
||||
|
||||
// Loop melalui setiap kecamatan
|
||||
foreach ($kalkulasi as $data) {
|
||||
// Perhitungan bobot untuk setiap variabel
|
||||
// ...
|
||||
|
||||
// Perhitungan D+ untuk setiap kecamatan
|
||||
$sum_of_squares = pow($bobots[$data->id]['bobot_altitude'] - $hasil_min['bobot_altitude'], 2) +
|
||||
pow( $bobots[$data->id]['bobot_rainfall'] - $hasil_min['bobot_rainfall'], 2) +
|
||||
pow($bobots[$data->id]['bobot_solar_radiation']- $hasil_min['bobot_solar_radiation'], 2) +
|
||||
|
@ -205,71 +179,26 @@ public function pembagi(Request $request)
|
|||
pow($bobots[$data->id]['bobot_humidity'] - $hasil_min['bobot_humidity'], 2);
|
||||
|
||||
$result_d_min = sqrt($sum_of_squares);
|
||||
|
||||
// Simpan hasil perhitungan D+ untuk setiap kecamatan
|
||||
$d_min_values[$data->id] = $result_d_min;
|
||||
}
|
||||
|
||||
PreverensiKal::truncate();
|
||||
// Loop melalui setiap kecamatan
|
||||
foreach ($kalkulasi as $data) {
|
||||
// Perhitungan D+/ (D+ + D-)
|
||||
// Proses perhitungan nilai preferensi
|
||||
$preference_value = $d_min_values[$data->id] / ($d_min_values[$data->id] + $d_plus_values[$data->id]);
|
||||
|
||||
// Simpan hasil perhitungan preferensi untuk setiap kecamatan
|
||||
$preferences[$data->id] = $preference_value;
|
||||
|
||||
// Simpan hasil preferensi ke dalam database
|
||||
$preference = new PreverensiKal();
|
||||
$preference->kalkulasis_id = $data->id; // Sesuaikan dengan nama kolom ID kecamatan
|
||||
$preference->kalkulasis_id = $data->id;
|
||||
$preference->preverensi = $preference_value;
|
||||
$preference->save();
|
||||
|
||||
}
|
||||
|
||||
return view('kalkulasi/hitung-kal', ['results' => $results, 'bobots' => $bobots, 'hasil_max' => $hasil_max, 'hasil_min' => $hasil_min, 'd_plus_values' => $d_plus_values, 'd_min_values' => $d_min_values, 'kalkulasi' => $kalkulasi]);
|
||||
// return $results;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// public function simpanData()
|
||||
// {
|
||||
// $preverensis = Preverensi::all();
|
||||
// $preverensi_kal = PreverensiKal::all();
|
||||
// if ($preverensi_kal->isEmpty()) {
|
||||
// return back()->withWarning('Isi Data Kalkulasi terlebih dahulu!');
|
||||
// }
|
||||
|
||||
// Comparison::truncate();
|
||||
|
||||
// foreach ($preverensis as $preverensi) {
|
||||
// $prev_padi = PreverensiKal::where('kalkulasis_id', '1')->first();
|
||||
// $prev_jagung = PreverensiKal::where('kalkulasis_id', '2')->first();
|
||||
// $prev_kedelai = PreverensiKal::where('kalkulasis_id', '3')->first();
|
||||
|
||||
// $results = new Comparison(); // Membuat instance model untuk menyimpan hasil perbandingan
|
||||
|
||||
// if ($preverensi->preverensi >= $prev_padi->preverensi) {
|
||||
// $results->result = "Padi";
|
||||
// } elseif ($preverensi->preverensi >= $prev_jagung->preverensi) {
|
||||
// $results->result = "Jagung";
|
||||
// } else {
|
||||
// $results->result = "Kedelai";
|
||||
// }
|
||||
|
||||
// // Mengatur ID kecamatan untuk hasil perbandingan
|
||||
// $results->subdistrict_id = $preverensi->subdistrict_id;
|
||||
|
||||
// // Menyimpan hasil perbandingan ke database
|
||||
// $results->save();
|
||||
// }
|
||||
|
||||
// return redirect('/comparison');
|
||||
// }
|
||||
|
||||
public function simpanData()
|
||||
{
|
||||
{
|
||||
$preverensis = Preverensi::all();
|
||||
$preverensi_kal = PreverensiKal::all();
|
||||
if ($preverensi_kal->isEmpty()) {
|
||||
|
@ -278,45 +207,28 @@ public function simpanData()
|
|||
|
||||
Comparison::truncate();
|
||||
|
||||
// Mendefinisikan array untuk menyimpan nilai preverensi maksimum untuk setiap jenis tanaman
|
||||
$max_preverensi = [];
|
||||
|
||||
foreach ($preverensi_kal as $preverensi) {
|
||||
$max_preverensi[$preverensi->kalkulasis_id] = $preverensi->preverensi;
|
||||
}
|
||||
|
||||
foreach ($preverensis as $preverensi) {
|
||||
$results = new Comparison(); // Membuat instance model untuk menyimpan hasil perbandingan
|
||||
$results = new Comparison();
|
||||
|
||||
// Mengatur nilai awal untuk perbandingan
|
||||
$result = 3; // Nilai default untuk hasil perbandingan
|
||||
$max_value = -1;
|
||||
|
||||
// Melakukan perbandingan untuk setiap jenis tanaman
|
||||
foreach ($max_preverensi as $kalkulasis_id => $preverensi_value) {
|
||||
if ($preverensi->preverensi >= $preverensi_value && $preverensi_value > $max_value) {
|
||||
$result = $kalkulasis_id;
|
||||
$max_value = $preverensi_value;
|
||||
}
|
||||
}
|
||||
|
||||
// Mengatur hasil perbandingan ke kolom 'kalkulasis_id'
|
||||
$results->kalkulasis_id = $result;
|
||||
|
||||
// Mengatur ID kecamatan untuk hasil perbandingan
|
||||
$results->subdistrict_id = $preverensi->subdistrict_id;
|
||||
|
||||
// Menyimpan hasil perbandingan ke database
|
||||
$results->save();
|
||||
}
|
||||
|
||||
|
||||
return redirect('/comparison');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
|
@ -346,14 +258,24 @@ public function update(Request $request, string $id)
|
|||
return redirect('/kalkulasi')->withInfo('Data berhasil diupdate!');
|
||||
}
|
||||
|
||||
public function map()
|
||||
{
|
||||
return view('comparison.map');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function delete(string $id)
|
||||
{
|
||||
// Menghapus entri dari tabel Kalkulasi
|
||||
$kalkulasi = Kalkulasi::findorfail($id);
|
||||
$kalkulasi->delete();
|
||||
$comparison = Comparison::all();
|
||||
if (!$comparison->isEmpty()) {
|
||||
return back()->withInfo('Refresh Data Kalkulasi atau Alternatif terlebih dahulu!');
|
||||
}
|
||||
// return back()->withWarning('Refresh data Kalkulasi atau Alternatif terlebih dahulu!');
|
||||
|
||||
$kalkulasi = Kalkulasi::findorfail($id);
|
||||
$kalkulasi->delete();
|
||||
|
||||
return back()->withWarning('Data berhasil dihapus!');
|
||||
}
|
||||
|
|
|
@ -33,13 +33,6 @@ public function perhitungan()
|
|||
return view('subdistrict/perhitungan',compact('subdistricts'));
|
||||
}
|
||||
|
||||
public function hasil()
|
||||
{
|
||||
// Ambil nilai preferensi dari database
|
||||
$preferences = Preverensi::orderByDesc('preverensi')->get();
|
||||
// $preferences = Preverensi::all();
|
||||
return view('hasil/hasil', compact('preferences'));
|
||||
}
|
||||
|
||||
public function pembagi(Request $request)
|
||||
{
|
||||
|
@ -54,17 +47,14 @@ public function pembagi(Request $request)
|
|||
$kriteria_temperature = Kriteria::where('name', 'temperature')->first();
|
||||
$kriteria_humidity = Kriteria::where('name', 'kelembapan')->first();
|
||||
|
||||
// Memeriksa apakah salah satu kriteria tidak ditemukan
|
||||
if (!$kriteria_altitude || !$kriteria_rainfall || !$kriteria_solar_radiation || !$kriteria_ph_soil || !$kriteria_temperature || !$kriteria_humidity) {
|
||||
return back()->withWarning('Isi dan periksa data kriteria terlebih dahulu!');
|
||||
}
|
||||
|
||||
|
||||
$results = [];
|
||||
$bobots = [];
|
||||
$hasil_max = [];
|
||||
$hasil_min = [];
|
||||
$d_plus = [];
|
||||
$preference = [];
|
||||
|
||||
$sum_of_altitude = 0;
|
||||
|
@ -73,8 +63,6 @@ public function pembagi(Request $request)
|
|||
$sum_of_ph_soil = 0;
|
||||
$sum_of_temperature = 0;
|
||||
$sum_of_humidity = 0;
|
||||
$plus = 0;
|
||||
$min = 0;
|
||||
|
||||
foreach ($subdistricts as $data) {
|
||||
$sum_of_altitude += pow($data->altitude, 2);
|
||||
|
@ -92,7 +80,6 @@ public function pembagi(Request $request)
|
|||
$result5 = sqrt($sum_of_temperature);
|
||||
$result6 = sqrt($sum_of_humidity);
|
||||
|
||||
// Menggunakan array untuk menyimpan hasil
|
||||
$results['result1'] = $result1;
|
||||
$results['result2'] = $result2;
|
||||
$results['result3'] = $result3;
|
||||
|
@ -101,7 +88,7 @@ public function pembagi(Request $request)
|
|||
$results['result6'] = $result6;
|
||||
|
||||
foreach ($subdistricts as $data) {
|
||||
// Mendapatkan nilai kriteria yang sesuai untuk setiap variabel
|
||||
// Untuk mendapatkan nilai kriteria yang sesuai untuk setiap variabel
|
||||
$kriteria_altitude = Kriteria::where('name', 'ketinggian tempat')->first();
|
||||
$kriteria_rainfall = Kriteria::where('name', 'curah hujan')->first();
|
||||
$kriteria_solar_radiation = Kriteria::where('name', 'penyinaran matahari')->first();
|
||||
|
@ -117,7 +104,6 @@ public function pembagi(Request $request)
|
|||
$bobot_temperature = ($data->temperature / $results['result5']) * $kriteria_temperature->bobot;
|
||||
$bobot_humidity = ($data->humidity / $results['result6']) * $kriteria_humidity->bobot;
|
||||
|
||||
// Simpan bobot ke dalam array
|
||||
$bobots[$data->id] = [
|
||||
'bobot_altitude' => $bobot_altitude,
|
||||
'bobot_rainfall' => $bobot_rainfall,
|
||||
|
@ -129,15 +115,13 @@ public function pembagi(Request $request)
|
|||
}
|
||||
|
||||
foreach ($subdistricts as $data) {
|
||||
// Mendapatkan nilai kriteria yang sesuai untuk setiap variabel
|
||||
$hasil_altitude = Kriteria::where('description', 'cost')->first();
|
||||
$hasil_rainfall = Kriteria::where('description', 'benefit')->first();
|
||||
$hasil_solar_radiation = Kriteria::where('description', 'benefit')->first();
|
||||
$hasil_ph_soil = Kriteria::where('description', 'benefit')->first();
|
||||
$hasil_temperature = Kriteria::where('description', 'cost')->first();
|
||||
$hasil_humidity = Kriteria::where('description', 'benefit')->first();
|
||||
// Simpan hasil perhitungan maksimum (benefit) ke dalam array
|
||||
// Simpan hasil perhitungan maksimum (benefit) ke dalam array
|
||||
|
||||
$hasil_max = [
|
||||
'bobot_altitude' => ($hasil_altitude->description == 'benefit') ? max(array_column($bobots, 'bobot_altitude')) : min(array_column($bobots, 'bobot_altitude')),
|
||||
'bobot_rainfall' => ($hasil_rainfall->description == 'cost') ? min(array_column($bobots, 'bobot_rainfall')) : max(array_column($bobots, 'bobot_rainfall')),
|
||||
|
@ -147,7 +131,6 @@ public function pembagi(Request $request)
|
|||
'bobot_humidity' => ($hasil_humidity->description == 'cost') ? min(array_column($bobots, 'bobot_humidity')) : max(array_column($bobots, 'bobot_humidity')),
|
||||
];
|
||||
|
||||
// Simpan hasil perhitungan minimum (cost) ke dalam array
|
||||
$hasil_min = [
|
||||
'bobot_altitude' => ($hasil_altitude->description == 'benefit') ? min(array_column($bobots, 'bobot_altitude')) : max(array_column($bobots, 'bobot_altitude')),
|
||||
'bobot_rainfall' => ($hasil_rainfall->description == 'cost') ? max(array_column($bobots, 'bobot_rainfall')) : min(array_column($bobots, 'bobot_rainfall')),
|
||||
|
@ -159,17 +142,9 @@ public function pembagi(Request $request)
|
|||
|
||||
|
||||
// Menghitung D+
|
||||
|
||||
$d_plus_values = [];
|
||||
|
||||
$d_min_values = [];
|
||||
|
||||
// Loop melalui setiap kecamatan
|
||||
foreach ($subdistricts as $data) {
|
||||
// Perhitungan bobot untuk setiap variabel
|
||||
// ...
|
||||
|
||||
// Perhitungan D+ untuk setiap kecamatan
|
||||
$sum_of_squares = pow($hasil_max['bobot_altitude'] - $bobots[$data->id]['bobot_altitude'], 2) +
|
||||
pow($hasil_max['bobot_rainfall'] - $bobots[$data->id]['bobot_rainfall'], 2) +
|
||||
pow($hasil_max['bobot_solar_radiation'] - $bobots[$data->id]['bobot_solar_radiation'], 2) +
|
||||
|
@ -178,20 +153,10 @@ public function pembagi(Request $request)
|
|||
pow($hasil_max['bobot_humidity'] - $bobots[$data->id]['bobot_humidity'], 2);
|
||||
|
||||
$result_d_plus = sqrt($sum_of_squares);
|
||||
|
||||
// Simpan hasil perhitungan D+ untuk setiap kecamatan
|
||||
$d_plus_values[$data->id] = $result_d_plus;
|
||||
}
|
||||
|
||||
// Gunakan $d_plus_values sesuai kebutuhan di aplikasi Anda
|
||||
// dd($d_plus_values);
|
||||
|
||||
// Loop melalui setiap kecamatan
|
||||
foreach ($subdistricts as $data) {
|
||||
// Perhitungan bobot untuk setiap variabel
|
||||
// ...
|
||||
|
||||
// Perhitungan D+ untuk setiap kecamatan
|
||||
$sum_of_squares = pow($bobots[$data->id]['bobot_altitude'] - $hasil_min['bobot_altitude'], 2) +
|
||||
pow( $bobots[$data->id]['bobot_rainfall'] - $hasil_min['bobot_rainfall'], 2) +
|
||||
pow($bobots[$data->id]['bobot_solar_radiation']- $hasil_min['bobot_solar_radiation'], 2) +
|
||||
|
@ -200,31 +165,21 @@ public function pembagi(Request $request)
|
|||
pow($bobots[$data->id]['bobot_humidity'] - $hasil_min['bobot_humidity'], 2);
|
||||
|
||||
$result_d_min = sqrt($sum_of_squares);
|
||||
|
||||
// Simpan hasil perhitungan D+ untuk setiap kecamatan
|
||||
$d_min_values[$data->id] = $result_d_min;
|
||||
}
|
||||
|
||||
Preverensi::truncate();
|
||||
// Loop melalui setiap kecamatan
|
||||
foreach ($subdistricts as $data) {
|
||||
// Perhitungan D+/ (D+ + D-)
|
||||
// Proses perhitungan nilai preferensi
|
||||
$preference_value = $d_min_values[$data->id] / ($d_min_values[$data->id] + $d_plus_values[$data->id]);
|
||||
|
||||
// Simpan hasil perhitungan preferensi untuk setiap kecamatan
|
||||
$preferences[$data->id] = $preference_value;
|
||||
|
||||
// Simpan hasil preferensi ke dalam database
|
||||
$preference = new Preverensi();
|
||||
$preference->subdistrict_id = $data->id; // Sesuaikan dengan nama kolom ID kecamatan
|
||||
$preference->subdistrict_id = $data->id;
|
||||
$preference->preverensi = $preference_value;
|
||||
$preference->save();
|
||||
|
||||
}
|
||||
|
||||
|
||||
return view('perhitungan/perhitungan', ['results' => $results, 'bobots' => $bobots, 'hasil_max' => $hasil_max, 'hasil_min' => $hasil_min, 'd_plus_values' => $d_plus_values, 'd_min_values' => $d_min_values, 'subdistricts' => $subdistricts]);
|
||||
// return $results;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -313,6 +268,12 @@ public function update(Request $request, string $id)
|
|||
*/
|
||||
public function delete(Subdistrict $subdistrict, string $id)
|
||||
{
|
||||
$comparison = Comparison::all();
|
||||
if (!$comparison->isEmpty()) {
|
||||
return back()->withInfo('Refresh Data Alternatif atau Kalkulasi terlebih dahulu!');
|
||||
}
|
||||
// return back()->withWarning('Refresh data Alternatif atau Kalkulasi terlebih dahulu!');
|
||||
|
||||
$subdistrict = Subdistrict::findorfail($id);
|
||||
$subdistrict->delete();
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Exports\UsersExport;
|
||||
use App\Models\Comparison;
|
||||
use App\Models\PreverensiKal;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
@ -86,11 +88,11 @@ public function update(Request $request)
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(User $user, string $id)
|
||||
public function delete(User $user, string $id)
|
||||
{
|
||||
$user = User::findorfail($id);
|
||||
$user->delete();
|
||||
|
||||
return redirect()->route('/')->with('warning', 'Akun berhasil diupdate!');
|
||||
return back()->withWarning('Data Berhasil Dihapus!');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,32 +3,209 @@
|
|||
// initialize map
|
||||
var map = new GMaps({
|
||||
div: '#map',
|
||||
lat: -6.8665409,
|
||||
lng: 106.4836553,
|
||||
zoom: 8
|
||||
lat: -8.210149,
|
||||
lng: 114.372151,
|
||||
zoom: 9
|
||||
});
|
||||
// Added markers to the map
|
||||
map.addMarker({
|
||||
lat: -6.5637928,
|
||||
lng: 106.7535061,
|
||||
title: 'Multinity',
|
||||
lat: -8.558557,
|
||||
lng: 114.049134,
|
||||
title: 'Pesanggaran',
|
||||
infoWindow: {
|
||||
content: '<h6>Multinity</h6><p>Jl. HM. Syarifudin, Bubulak, Bogor Bar., <br>Kota Bogor, Jawa Barat 16115</p><p><a target="_blank" href="https://multinity.com">Website</a></p>'
|
||||
content: '<h6>Pesanggaran</h6><p>Rekomendasi Tanaman Pangan : Kedelai</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -6.1325841,
|
||||
lng: 106.8116507,
|
||||
title: 'Procyon Logikreasi Indonesia',
|
||||
lat: -8.477425,
|
||||
lng: 114.068929,
|
||||
title: 'Siliragung',
|
||||
infoWindow: {
|
||||
content: '<h6>Procyon Logikreasi Indonesia</h6><p>Jl. Kali Besar Tim. No.29C, RT.7/RW.7, Pinangsia, Tamansari, Kota Jakarta Barat, Daerah Khusus Ibukota Jakarta 11110</p><p><a target="_blank" href="https://procyon.co.id/">Website</a></p>'
|
||||
content: '<h6>Siliragung</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -6.4462693,
|
||||
lng: 106.7654318,
|
||||
title: 'Sigma ID',
|
||||
lat: -8.560094,
|
||||
lng: 114.201438,
|
||||
title: 'Bangorejo',
|
||||
infoWindow: {
|
||||
content: '<h6>Sigma ID</h6><p>Jl.Setapak No.5, Citayam, Tajur Halang, Bogor, Jawa Barat 16320</p><p><a target="_blank" href="http://sigmaid.net/">Website</a></p>'
|
||||
content: '<h6>Bangorejo</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.526788,
|
||||
lng: 114.240718,
|
||||
title: 'Purwoharjo',
|
||||
infoWindow: {
|
||||
content: '<h6>Purwoharjo</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.574783,
|
||||
lng: 114.329973,
|
||||
title: 'Tegaldlimo',
|
||||
infoWindow: {
|
||||
content: '<h6>Tegaldlimo</h6><p>Rekomendasi Tanaman Pangan : Padi</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.442559,
|
||||
lng: 114.299675,
|
||||
title: 'Muncar',
|
||||
infoWindow: {
|
||||
content: '<h6>Muncar</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.431676,
|
||||
lng: 114.251116,
|
||||
title: 'Cluring',
|
||||
infoWindow: {
|
||||
content: '<h6>Cluring</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.387200,
|
||||
lng: 114.152205,
|
||||
title: 'Gambiran',
|
||||
infoWindow: {
|
||||
content: '<h6>Gambiran</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.419956,
|
||||
lng: 114.123711,
|
||||
title: 'Tegalsari',
|
||||
infoWindow: {
|
||||
content: '<h6>Tegalsari</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.289570,
|
||||
lng: 114.059542,
|
||||
title: 'Glenmore',
|
||||
infoWindow: {
|
||||
content: '<h6>Glenmore</h6><p>Rekomendasi Tanaman Pangan : Kedelai</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.295692,
|
||||
lng: 113.985395,
|
||||
title: 'Kalibaru',
|
||||
infoWindow: {
|
||||
content: '<h6>Kalibaru</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.339610,
|
||||
lng: 114.127927,
|
||||
title: 'Genteng',
|
||||
infoWindow: {
|
||||
content: '<h6>Genteng</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.377674,
|
||||
lng: 114.257062,
|
||||
title: 'Srono',
|
||||
infoWindow: {
|
||||
content: '<h6>Srono</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.332185,
|
||||
lng: 114.312751,
|
||||
title: 'Rogojampi',
|
||||
infoWindow: {
|
||||
content: '<h6>Rogojampi</h6><p>Rekomendasi Tanaman Pangan : Padi</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.317327,
|
||||
lng: 114.352853,
|
||||
title: 'Blimbingsari',
|
||||
infoWindow: {
|
||||
content: '<h6>Blimbingsari</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.267266,
|
||||
lng: 114.314496,
|
||||
title: 'Kabat',
|
||||
infoWindow: {
|
||||
content: '<h6>Kabat</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.299284,
|
||||
lng: 114.240643,
|
||||
title: 'Singojuruh',
|
||||
infoWindow: {
|
||||
content: '<h6>Singojuruh</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.273576,
|
||||
lng: 114.152089,
|
||||
title: 'Sempu',
|
||||
infoWindow: {
|
||||
content: '<h6>Sempu</h6><p>Rekomendasi Tanaman Pangan : Padi</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.180522,
|
||||
lng: 114.152158,
|
||||
title: 'Songgon',
|
||||
infoWindow: {
|
||||
content: '<h6>Songgon</h6><p>Rekomendasi Tanaman Pangan : Padi</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.202940,
|
||||
lng: 114.300714,
|
||||
title: 'Glagah',
|
||||
infoWindow: {
|
||||
content: '<h6>Glagah</h6><p>Rekomendasi Tanaman Pangan : Padi</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.195871,
|
||||
lng: 114.260611,
|
||||
title: 'Licin',
|
||||
infoWindow: {
|
||||
content: '<h6>Licin</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.225675,
|
||||
lng: 114.371857,
|
||||
title: 'Banyuwangi',
|
||||
infoWindow: {
|
||||
content: '<h6>Banyuwangi</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.189153,
|
||||
lng: 114.329179,
|
||||
title: 'Giri',
|
||||
infoWindow: {
|
||||
content: '<h6>Giri</h6><p>Rekomendasi Tanaman Pangan : Jagung</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.148302,
|
||||
lng: 114.348673,
|
||||
title: 'Kalipuro',
|
||||
infoWindow: {
|
||||
content: '<h6>Kalipuro</h6><p>Rekomendasi Tanaman Pangan : Kedelai</p>'
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -8.029729,
|
||||
lng: 114.307869,
|
||||
title: 'Wongsorejo',
|
||||
infoWindow: {
|
||||
content: '<h6>Wongsorejo</h6><p>Rekomendasi Tanaman Pangan : Kedelai</p>'
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-footer text-left">
|
||||
{{-- <div class="card-footer text-left">
|
||||
<label>Ingin hapus akun?</label><br>
|
||||
<button class="btn btn-danger">Hapus akun saya</button>
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -47,6 +47,20 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4>Titik Koordinat dan Informasi Sektor Tanaman Pangan di Kabupaten Banyuwangi</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="map" data-height="400"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Peta Dasar Leaflet Js</title>
|
||||
|
||||
<style>
|
||||
#peta { height: 680px; }
|
||||
</style>
|
||||
|
||||
<!-- css leaflfet -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
|
||||
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
|
||||
crossorigin=""/>
|
||||
|
||||
<!-- leafletjs -->
|
||||
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
|
||||
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
|
||||
crossorigin=""></script>
|
||||
<script src="geosearch/src/js/l.control.geosearch.js"></script>
|
||||
<script src="geosearch/src/js/l.geosearch.provider.google.js"></script>
|
||||
|
||||
<!-- leaflet search -->
|
||||
<link rel="stylesheet" href="geosearch/src/css/l.geosearch.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet-geosearch@3.0.0/dist/geosearch.css">
|
||||
<script src="https://unpkg.com/leaflet-geosearch@3.1.0/dist/geosearch.umd.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="peta"></div>
|
||||
|
||||
<script>
|
||||
|
||||
// you want to get it of the window global
|
||||
const providerOSM = new GeoSearch.OpenStreetMapProvider();
|
||||
|
||||
//leaflet map
|
||||
var leafletMap = L.map('peta', {
|
||||
fullscreenControl: true,
|
||||
|
||||
// OR
|
||||
fullscreenControl: {pseudoFullscreen: false // if true, fullscreen to page width and height
|
||||
},
|
||||
minZoom: 2
|
||||
}).setView([0,0], 2);
|
||||
|
||||
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>', accessToken: 'your.mapbox.access.token' }).addTo(leafletMap);
|
||||
|
||||
let theMarker = {};
|
||||
|
||||
leafletMap.on('click',function(e) {
|
||||
let latitude = e.latlng.lat.toString().substring(0,15);
|
||||
let longitude = e.latlng.lng.toString().substring(0,15);
|
||||
// document.getElementById("latitude").value = latitude;
|
||||
// document.getElementById("longitude").value = longitude;
|
||||
let popup = L.popup()
|
||||
.setLatLng([latitude,longitude])
|
||||
.setContent("Kordinat : " + latitude +" - "+ longitude )
|
||||
.openOn(leafletMap);
|
||||
|
||||
if (theMarker != undefined) {
|
||||
leafletMap.removeLayer(theMarker);
|
||||
};
|
||||
theMarker = L.marker([latitude,longitude]).addTo(leafletMap);
|
||||
});
|
||||
|
||||
const search = new GeoSearch.GeoSearchControl({
|
||||
provider: providerOSM,
|
||||
style: 'icon',
|
||||
searchLabel: 'Klik Pencarian Lokasi',
|
||||
});
|
||||
leafletMap.addControl(search);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -20,11 +20,7 @@
|
|||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Nama</label>
|
||||
<select class="form-control" id="kalkulasis" name="kalkulasis">
|
||||
<option {{ $kalkulasi->kalkulasis == 'Padi' ? 'selected' : '' }}>Padi</option>
|
||||
<option {{ $kalkulasi->kalkulasis == 'Jagung' ? 'selected' : '' }}>Jagung</option>
|
||||
<option {{ $kalkulasi->kalkulasis == 'Kedelai' ? 'selected' : '' }}>Kedelai</option>
|
||||
</select>
|
||||
<input type="text" id="kalkulasis" name="kalkulasis" class="form-control" value="{{ $kalkulasi->kalkulasis }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Ketinggian Tempat</label>
|
||||
|
|
|
@ -217,62 +217,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Tabel Hasil Preferensi dan Rangking</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="table-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">#</th>
|
||||
<th>Kecamatan</th>
|
||||
<th>Preferensi</th>
|
||||
<th>Ranking</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- Buat array untuk menyimpan hasil perhitungan --}}
|
||||
<?php $rankings = []; ?>
|
||||
|
||||
{{-- Loop melalui setiap kecamatan --}}
|
||||
@foreach ($kalkulasi as $data)
|
||||
{{-- Perhitungan D+/ (D+ + D-) --}}
|
||||
<?php
|
||||
$preference = $d_min_values[$data->id] / ($d_min_values[$data->id] + $d_plus_values[$data->id]);
|
||||
?>
|
||||
|
||||
{{-- Simpan hasil perhitungan ke dalam array --}}
|
||||
<?php $rankings[] = ['kalkulasis' => $data->kalkulasis, 'preference' => $preference]; ?>
|
||||
@endforeach
|
||||
|
||||
{{-- Urutkan array berdasarkan preferensi dari yang terbesar ke terkecil --}}
|
||||
<?php
|
||||
usort($rankings, function($a, $b) {
|
||||
return $b['preference'] <=> $a['preference'];
|
||||
});
|
||||
?>
|
||||
|
||||
{{-- Tampilkan hasil perhitungan D+/ (D+ + D-) dalam bentuk tabel --}}
|
||||
@foreach ($rankings as $ranking)
|
||||
<tr>
|
||||
<td class="text-center">{{ $loop->iteration }}</td>
|
||||
<td>{{ $ranking['kalkulasis'] }}</td>
|
||||
<td>{{ $ranking['preference'] }}</td>
|
||||
<td class="text-center bold">{{ $loop->iteration }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<td>{{ $data->humidity }}</td>
|
||||
<td>
|
||||
<div class="d-flex align-items-center">
|
||||
<a class="btn btn-primary btn-action mr-1" href="/edit-kalkulasi,{{ $data->id }}" data-toggle="tooltip" title="Edit"><i class="fas fa-pencil-alt"></i></a>
|
||||
<a class="btn btn-primary btn-action mr-1" href="/edit-kalkulasi,{{ $data->id }}" data-toggle="tooltip" title="Edit"><i class="fas fa-pencil-alt"></i></a>
|
||||
<form action="/delete-kalkulasi,{{ $data->id }}" method="POST" class="ml-2">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
|
@ -166,96 +166,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Lihat Data Alternatif-->
|
||||
{{-- <div class="modal fade center-modal" id="alternatif" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
@if($kalkulasi->isEmpty())
|
||||
<p>Error!</p>
|
||||
@else
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Data Alternatif Kecamatan</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<form action="{{ route(/update-subdistrict',) }}" class="needs-validation" novalidate="" method="POST">
|
||||
@csrf
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">Nama </label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="altitude" name="altitude" value="" readonly>
|
||||
<div class="invalid-feedback">
|
||||
Tolong isi Nama Ketinggian Tempat!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">Ketinggian Tempat </label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="altitude" name="altitude" value="" readonly>
|
||||
<div class="invalid-feedback">
|
||||
Tolong isi Nama Ketinggian Tempat!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">Curah Hujan </label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="rainfall" name="rainfall" value="" readonly>
|
||||
<div class="invalid-feedback">
|
||||
Tolong isi Nama Kecamatan!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">Penyinaran Matahari </label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="solar_radiation" name="solar_radiation" value="" readonly>
|
||||
<div class="invalid-feedback">
|
||||
Tolong isi Nama Kecamatan!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">pH Tanah </label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="ph_soil" name="ph_soil" required="" value="" readonly>
|
||||
<div class="invalid-feedback">
|
||||
Tolong isi Nama Kecamatan!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">Temperature </label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="temperature" name="temperature" value="" readonly>
|
||||
<div class="invalid-feedback">
|
||||
Tolong isi Nama Kecamatan!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">Kelembapan </label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="humidity" name="humidity" value="{{ $data->humidity }}" readonly>
|
||||
<div class="invalid-feedback">
|
||||
Tolong isi Nama Kecamatan!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
<!-- Modal Edit -->
|
||||
{{-- <div class="modal fade" id="edit{{$data->id}}" tabindex="-1" role="dialog"
|
||||
{{-- <div class="modal fade" id="edit,{{ $data->id }}" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||
@if($kalkulasi->isEmpty())
|
||||
|
@ -264,11 +178,11 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel"><i class="fa fa-edit"></i> Edit
|
||||
Penilaian</h5>
|
||||
Kalkulasi</h5>
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-hidden="true">×</button>
|
||||
</div>
|
||||
<form action="{{ route('admin/update-subdistrict',$data->id) }}" method="POST">
|
||||
<form action="{{ route('/edit-kalkulasi',$data->id) }}" method="POST">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group row">
|
||||
|
|
|
@ -77,6 +77,8 @@ function gtag(){dataLayer.push(arguments);}
|
|||
<script src="{{ asset('assets/modules/jquery-ui/jquery-ui.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/modules/prism/prism.js') }}"></script>
|
||||
<script src="{{ asset('assets/modules/sweetalert/sweetalert.min.js') }}"></script>
|
||||
<script src="{{ asset('http://maps.google.com/maps/api/js?key=AIzaSyB55Np3_WsZwUQ9NS7DP-HnneleZLYZDNw&sensor=true') }}"></script>
|
||||
<script src="{{ asset('assets/modules/gmaps.js') }}"></script>
|
||||
|
||||
<!-- Page Specific JS File -->
|
||||
<script src="{{ asset('assets/js/page/index-0.js') }}"></script>
|
||||
|
@ -84,6 +86,7 @@ function gtag(){dataLayer.push(arguments);}
|
|||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
|
||||
<script src="{{ asset('assets/js/page/bootstrap-modal.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/page/modules-sweetalert.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/page/gmaps-multiple-marker.js') }}"></script>
|
||||
|
||||
<!-- Template JS File -->
|
||||
<script src="{{ asset('assets/js/scripts.js') }}"></script>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<td>{{ $data->level }}</td>
|
||||
<td>
|
||||
<div class="d-flex align-items-center">
|
||||
<form action="delete-user,{{ $data->id }}" method="POST" class="ml-2">
|
||||
<form action="delete-users,{{ $data->id }}" method="POST" class="ml-2">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button class="btn btn-danger btn-action confirm_delete"><i class="fas fa-trash"></i></button>
|
||||
|
|
|
@ -74,14 +74,14 @@
|
|||
Route::post('/save-users',[App\Http\Controllers\UserController::class, 'store'])->name('/save-users');
|
||||
Route::get('/edit-users-{id}',[App\Http\Controllers\UserController::class, 'edit'])->name('/edit-users');
|
||||
Route::post('/update-users-{id}',[App\Http\Controllers\UserController::class, 'update'])->name('/update-users');
|
||||
Route::get('/delete-users,{id}',[App\Http\Controllers\UserController::class, 'destroy'])->name('/delete-users');
|
||||
Route::delete('/delete-users,{id}',[App\Http\Controllers\UserController::class, 'delete'])->name('/delete-users');
|
||||
Route::get('/export-users',[App\Http\Controllers\UserController::class, 'userexport'])->name('/export-users');
|
||||
Route::post('/import-users',[App\Http\Controllers\UserController::class, 'humidityimport'])->name('/import-users');
|
||||
Route::get('/downloadtemplate-users',[App\Http\Controllers\UserController::class, 'downloadTemplate'])->name('/downloadtemplate-users');
|
||||
|
||||
|
||||
Route::get('/kalkulasi',[App\Http\Controllers\KalkulasiController::class, 'index'])->name('/kalkulasi');
|
||||
|
||||
Route::get('/map',[App\Http\Controllers\KalkulasiController::class, 'map'])->name('/map');
|
||||
Route::post('/save-data',[App\Http\Controllers\KalkulasiController::class, 'simpanData'])->name('/save-data');
|
||||
Route::get('/del-kal', [KalkulasiController::class, 'deleteKal'])->name('delete.kal');
|
||||
Route::get('/hitung-kal',[App\Http\Controllers\KalkulasiController::class, 'pembagi'])->name('/hitung-kal');
|
||||
|
|
Loading…
Reference in New Issue