<?php

use App\Http\Controllers\DataBumdesController;
use App\Http\Controllers\DataClatransController;
use App\Http\Controllers\DataDeswitaController;
use App\Http\Controllers\DataDistrikBumdesController;
use App\Http\Controllers\DataDistrikCaltransController;
use App\Http\Controllers\DataDistrikDeswitaController;
use App\Http\Controllers\DataDistrikKpmdController;
use App\Http\Controllers\DataKpmdController;
use App\Http\Controllers\DataPribadiBumdesController;
use App\Http\Controllers\DataPribadiCaltransController;
use App\Http\Controllers\DataPribadiDeswitaController;
use App\Http\Controllers\DataPribadiKpmdController;
use App\Http\Controllers\PotensiSdmController;
use App\Http\Controllers\DataWisata;
use Dflydev\DotAccessData\Data;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('/login', function () {
    return view('login.index');
});
Route::get('/', function () {
    return view('layout.index');
});
Route::get('/data-pribadi-kmpd', function () {
    return view('KPMD.index');
});
Route::get('/data-pribadi-bumdes', function () {
    return view('BumDes.index');
});
Route::get('/data-pribadi-caltrans', function () {
    return view('CalTrans.index');
});
Route::get('/data-pribadi-deswita', function () {
    return view('DesWita.index');
});
// Route::get('/data-distrik-kpmd', function () {
//     return view('KPMD.data-distrik');
// });

Route::get('/test', function () {
    return view('test.index');
});
Route::resource('potensi-sdm', PotensiSdmController::class)->parameter('potensi-sdm', 'potensi_sdms');

Route::resource('kpmd', DataPribadiKpmdController::class)->parameter('kpmd', 'data_pribadi_kpmds');
// Route::resource('data-distrik-kpmd', DataDistrikKpmdController::class)->parameter('data-distrik-kpmd', 'data_distrik_kpmds');
// Route::resource('kpmd-data-kpmd', DataKpmdController::class)->parameter('kpmd-data-kpmd', 'data-kpmds');


Route::resource('bumdes', DataPribadiBumdesController::class)->parameter('bumdes', 'data_pribadi_bumdes');
//Route::resource('data-distrik-bumdes', DataDistrikBumdesController::class)->parameter('data-distrik-bumdes', 'data_distrik_bumdes');
//Route::resource('bumdes-data-bumdes', DataBumdesController::class)->parameter('bumdes-data-bumdes', 'data_bumdes');

Route::resource('deswita', DataPribadiDeswitaController::class)->parameter('deswita', 'data_pribadi_deswitas');
//Route::resource('data-distrik-deswita', DataDistrikDeswitaController::class)->parameter('data-distrik-deswita', 'data_distrik_deswitas');

Route::resource('caltrans', DataPribadiCaltransController::class)->parameter('caltrans', 'data_pribadi_caltrans');
//Route::resource('data-distrik-caltrans', DataDistrikCaltransController::class)->parameter('data-distrik-caltrans', 'data_distrik_caltrans');


Route::post('save-bumdes-data-bumdes', [DataBumdesController::class,"savebumdes"])->name("savebumdesdatabumdes");
Route::post('save-kpmd-data-kpmd', [DataKpmdController::class,"savedatakpmd"])->name("savekpmddatakpmd");
Route::post('save-deswita-data-deswita', [DataDeswitaController::class,"savedatadeswita"])->name("savedeswitadatadeswita");
Route::post('save-caltrans-data-caltrans', [DataClatransController::class,"savedatacaltrans"])->name("savecaltransdatacaltrans");