diff --git a/app/Http/Controllers/BucokController.php b/app/Http/Controllers/BucokController.php new file mode 100644 index 0000000..aadd566 --- /dev/null +++ b/app/Http/Controllers/BucokController.php @@ -0,0 +1,209 @@ +user) || !$this->user->can('bucok.view')) { + // abort(403, 'Sorry! You are not allowed to view bucok.'); + } + + // Retrieve data from the database + $query = Bucok::query(); + + // Apply search filter if provided + if ($request->has('search') && !empty($request->get('search'))) { + $search = $request->get('search'); + $query->where(function ($q) use ($search) { + $q->where('nomor_tiket', 'LIKE', "%$search%") + ->orWhere('deskripsi', 'LIKE', "%$search%") + ->orWhere('nomor_coa', 'LIKE', "%$search%") + ->orWhere('nama_coa', 'LIKE', "%$search%") + ->orWhere('cost_center', 'LIKE', "%$search%") + ->orWhere('nama_sub_direktorat', 'LIKE', "%$search%") + ->orWhere('nama_direktorat_cabang', 'LIKE', "%$search%") + ->orWhere('penyelesaian', 'LIKE', "%$search%") + ->orWhere('keterangan_gantung', 'LIKE', "%$search%"); + }); + } + + // Apply date range filter + if ($request->has('start_date') && !empty($request->get('start_date'))) { + $query->whereDate('tanggal', '>=', $request->get('start_date')); + } + if ($request->has('end_date') && !empty($request->get('end_date'))) { + $query->whereDate('tanggal', '<=', $request->get('end_date')); + } + + // Apply year filter + if ($request->has('year') && !empty($request->get('year'))) { + $query->byYear($request->get('year')); + } + + // Apply month filter + if ($request->has('month') && !empty($request->get('month'))) { + $query->byMonth($request->get('month')); + } + + // Apply cost center filter + if ($request->has('cost_center') && !empty($request->get('cost_center'))) { + $query->byCostCenter($request->get('cost_center')); + } + + // Apply completion status filter + if ($request->has('completion_status') && $request->get('completion_status') !== '') { + $isCompleted = $request->get('completion_status') == '1'; + $query->byCompletionStatus($isCompleted); + } + + // Apply sorting if provided + if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { + $order = $request->get('sortOrder'); + $column = $request->get('sortField', 'created_at'); + $query->orderBy($column, $order); + } else { + $query->orderBy('created_at', 'desc'); + } + + // Get the total count of records + $totalRecords = $query->count(); + + // Apply pagination if provided + if ($request->has('page') && $request->has('size')) { + $page = $request->get('page'); + $size = $request->get('size'); + $offset = ($page - 1) * $size; // Calculate the offset + + $query->skip($offset)->take($size); + } + + // Get the filtered count of records + $filteredRecords = $query->count(); + + // Get the data for the current page with relationships + $data = $query->get(); + + // Transform data untuk datatables + $transformedData = $data->map(function ($item) { + return [ + 'id' => $item->id, + 'no' => $item->no, + 'tanggal' => $item->tanggal ? dateFormat($item->tanggal,true) : '-', + 'bulan' => $item->bulan, + 'tahun' => $item->tahun, + 'nomor_tiket' => $item->nomor_tiket, + 'nomor_coa' => $item->nomor_coa, + 'nama_coa' => $item->nama_coa, + 'deskripsi' => $item->deskripsi, + 'nominal' => $item->nominal_formatted, + 'penyelesaian' => $item->penyelesaian, + 'umur_aging' => $item->umur_aging, + 'cost_center' => $item->cost_center, + 'nama_sub_direktorat' => $item->nama_sub_direktorat, + 'nama_direktorat_cabang' => $item->nama_direktorat_cabang, + 'tanggal_penyelesaian' => $item->tanggal_penyelesaian ? dateFormat($item->tanggal_penyelesaian,true) : '-', + 'nominal_penyelesaian' => $item->nominal_penyelesaian_formatted, + 'status_penyelesaian' => $item->status_penyelesaian, + 'status_badge' => $item->status_badge, + 'created_by' => $item->creator?->name ?? '-', + 'created_at' => dateFormat($item->created_at,true) + ]; + }); + + // Calculate the page count + $pageCount = ceil($totalRecords / ($request->get('size', 10))); + + // Calculate the current page number + $currentPage = $request->get('page', 1); + + // Return the response data as a JSON object + return response()->json([ + 'draw' => $request->get('draw'), + 'recordsTotal' => $totalRecords, + 'recordsFiltered' => $filteredRecords, + 'pageCount' => $pageCount, + 'page' => $currentPage, + 'totalCount' => $totalRecords, + 'data' => $transformedData, + ]); + } + + /** + * Import data bucok dari Excel + * + * @param Request $request + * @return \Illuminate\Http\RedirectResponse + */ + public function import(Request $request) + { + $request->validate([ + 'file' => 'required|mimes:xlsx,xls,csv|max:10240' // Max 10MB + ]); + + DB::beginTransaction(); + try { + Log::info('Importing Bucok data', ['user_id' => Auth::id(), 'filename' => $request->file('file')->getClientOriginalName()]); + + $import = new BucokImport(); + Excel::import($import, $request->file('file')); + $statistics = $import->getImportStatistics(); + + DB::commit(); + Log::info('Bucok data imported successfully', ['user_id' => Auth::id()]); + + return redirect()->back()->with('success', 'Data Bucok berhasil diimport. Total: ' . $statistics['total_processed'] . ', Created: ' . $statistics['created'] . ', Updated: ' . $statistics['updated'] . ', Skipped: ' . $statistics['skipped'] . ', Errors: ' . $statistics['errors']); + } catch (Exception $e) { + DB::rollback(); + Log::error('Failed to import Bucok data', ['error' => $e->getMessage(), 'user_id' => Auth::id()]); + + return redirect()->back()->with('error', 'Gagal import data: ' . $e->getMessage()); + } + } +} diff --git a/app/Imports/BucokImport.php b/app/Imports/BucokImport.php new file mode 100644 index 0000000..78eed72 --- /dev/null +++ b/app/Imports/BucokImport.php @@ -0,0 +1,341 @@ + $row) { + // Log setiap baris yang diproses + Log::info('Processing Bucok import row', [ + 'row_number' => $rowIndex + 5, // +5 karena mulai dari baris 5 + 'row_data' => $row->toArray() + ]); + + // Konversi row ke array dengan indeks numerik + $rowArray = $row->toArray(); + + // Skip baris kosong + if (empty(array_filter($rowArray))) { + continue; + } + + // Validasi data baris + $mappedData = $this->mapRowToBucok($rowArray, $rowIndex + 5); + + // Update atau create berdasarkan nomor_tiket + if (!empty($mappedData['nomor_tiket'])) { + // Update atau create berdasarkan nomor_tiket + $bucok = Bucok::updateOrCreate( + ['nomor_tiket' => $mappedData['nomor_tiket']], // Kondisi pencarian + array_merge($mappedData, ['updated_by' => auth()->id()]) // Data yang akan diupdate/create + ); + + // Log dan tracking apakah data di-update atau di-create + if ($bucok->wasRecentlyCreated) { + $this->createdCount++; + Log::info('Bucok created successfully', [ + 'row_number' => $rowIndex + 5, + 'nomor_tiket' => $mappedData['nomor_tiket'], + 'action' => 'created' + ]); + } else { + $this->updatedCount++; + Log::info('Bucok updated successfully', [ + 'row_number' => $rowIndex + 5, + 'nomor_tiket' => $mappedData['nomor_tiket'], + 'action' => 'updated' + ]); + } + } + + $this->importedCount++; + } + + DB::commit(); + + // Log summary + Log::info('Bucok import completed', [ + 'imported' => $this->importedCount, + 'skipped' => $this->skippedCount, + 'total_errors' => count($this->errors) + ]); + + } catch (Exception $e) { + DB::rollback(); + Log::error('Bucok import failed', ['error' => $e->getMessage()]); + throw $e; + } + } + + /** + * Mapping data Excel berdasarkan indeks kolom ke struktur model Bucok + * Kolom dimulai dari indeks 0 (A=0, B=1, C=2, dst.) + * + * @param array $row + * @param int $rowNumber + * @return array + */ + private function mapRowToBucok(array $row, int $rowNumber): array + { + return [ + 'no' => $row[0] ?? null, // Kolom A + 'tanggal' => !empty($row[1]) ? $this->parseDate($row[1]) : null, // Kolom B + 'bulan' => $row[2] ?? null, // Kolom C + 'tahun' => $row[3] ?? null, // Kolom D + 'tanggal_penuh' => !empty($row[4]) ? $this->parseDate($row[4]) : null, // Kolom E + 'nomor_categ' => $row[5] ?? null, // Kolom F + 'coa_summary' => $row[6] ?? null, // Kolom G + 'nomor_coa' => $row[7] ?? null, // Kolom H + 'nama_coa' => $row[8] ?? null, // Kolom I + 'nomor_tiket' => $row[9] ?? null, // Kolom J - Auto-generate jika kosong + 'deskripsi' => $row[10] ?? null, // Kolom K + 'nominal' => $this->parseNumeric($row[11] ?? 0), // Kolom L + 'penyelesaian' => $row[12] ?? 'Belum Selesai', // Kolom M + 'umur_aging' => $this->parseNumeric($row[13] ?? 0), // Kolom N + 'cost_center' => $row[14] ?? null, // Kolom O + 'nama_sub_direktorat' => $row[15] ?? null, // Kolom P + 'nama_direktorat_cabang' => $row[16] ?? null, // Kolom Q + 'tanggal_penyelesaian' => !empty($row[17]) ? $this->parseDate($row[17]) : null, // Kolom R + 'nominal_penyelesaian' => $this->parseNumeric($row[18] ?? 0), // Kolom S + 'nominal_berjalan' => $this->parseNumeric($row[19] ?? 0), // Kolom T + 'amortisasi_berjalan' => $this->parseNumeric($row[20] ?? 0), // Kolom U + 'sistem_berjalan' => $this->parseNumeric($row[21] ?? 0), // Kolom V + 'lainnya_berjalan' => $this->parseNumeric($row[22] ?? 0), // Kolom W + 'nominal_gantung' => $this->parseNumeric($row[23] ?? 0), // Kolom X + 'aset_gantung' => $this->parseNumeric($row[24] ?? 0), // Kolom Y + 'keterangan_gantung' => $row[25] ?? null, // Kolom Z + 'lainnya_satu' => $row[26] ?? null, // Kolom AA + 'lainnya_dua' => $row[27] ?? null, // Kolom AB + 'created_by' => auth()->id(), + 'updated_by' => auth()->id() + ]; + } + + /** + * Parse tanggal dari berbagai format + * + * @param mixed $dateValue + * @return Carbon|null + */ + private function parseDate($dateValue) + { + if (empty($dateValue)) { + return null; + } + + try { + // Jika berupa angka Excel date serial + if (is_numeric($dateValue)) { + return Carbon::createFromFormat('Y-m-d', \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($dateValue)->format('Y-m-d')); + } + + // Jika berupa string tanggal + return Carbon::parse($dateValue); + } catch (Exception $e) { + Log::warning('Failed to parse date', ['value' => $dateValue, 'error' => $e->getMessage()]); + return null; + } + } + + /** + * Parse nilai numerik dari berbagai format + * + * @param mixed $numericValue + * @return float + */ + private function parseNumeric($numericValue): float + { + if (empty($numericValue)) { + return 0; + } + + // Hapus karakter non-numerik kecuali titik dan koma + $cleaned = preg_replace('/[^0-9.,\-]/', '', $numericValue); + + // Ganti koma dengan titik untuk decimal + $cleaned = str_replace(',', '.', $cleaned); + + return (float) $cleaned; + } + + /** + * Validasi data yang sudah dimapping + * + * @param array $data + * @return \Illuminate\Validation\Validator + */ + private function validateMappedData(array $data) + { + return Validator::make($data, [ + 'no' => 'nullable|integer', + 'tanggal' => 'nullable|date', + 'bulan' => 'nullable|integer|between:1,12', + 'tahun' => 'nullable|integer|min:2000|max:2099', + 'tanggal_penuh' => 'nullable|date', + 'nomor_categ' => 'nullable|string|max:50', + 'coa_summary' => 'nullable|string|max:255', + 'nomor_coa' => 'nullable|string|max:50', + 'nama_coa' => 'nullable|string|max:255', + 'nomor_tiket' => 'nullable|string|max:50', + 'deskripsi' => 'nullable|string', + 'nominal' => 'nullable|numeric|min:0', + 'penyelesaian' => 'nullable|in:Selesai,Belum Selesai,Dalam Proses', + 'umur_aging' => 'nullable|integer|min:0', + 'cost_center' => 'nullable|string|max:100', + 'nama_sub_direktorat' => 'nullable|string|max:255', + 'nama_direktorat_cabang' => 'nullable|string|max:255', + 'tanggal_penyelesaian' => 'nullable|date', + 'nominal_penyelesaian' => 'nullable|numeric|min:0', + 'nominal_berjalan' => 'nullable|numeric|min:0', + 'amortisasi_berjalan' => 'nullable|numeric|min:0', + 'sistem_berjalan' => 'nullable|numeric|min:0', + 'lainnya_berjalan' => 'nullable|numeric|min:0', + 'nominal_gantung' => 'nullable|numeric|min:0', + 'aset_gantung' => 'nullable|numeric|min:0', + 'keterangan_gantung' => 'nullable|string', + 'lainnya_satu' => 'nullable|string', + 'lainnya_dua' => 'nullable|string' + ]); + } + + /** + * Aturan validasi untuk seluruh file Excel (tidak digunakan karena tanpa header) + * + * @return array + */ + public function rules(): array + { + return []; + } + + /** + * Ukuran batch untuk insert + * + * @return int + */ + public function batchSize(): int + { + return 100; + } + + /** + * Ukuran chunk untuk membaca file + * + * @return int + */ + public function chunkSize(): int + { + return 100; + } + + /** + * Mendapatkan jumlah data yang berhasil diimpor + * + * @return int + */ + public function getImportedCount(): int + { + return $this->importedCount; + } + + /** + * Mendapatkan jumlah data yang berhasil dibuat + * + * @return int + */ + public function getCreatedCount(): int + { + return $this->createdCount; + } + + /** + * Mendapatkan jumlah data yang berhasil diupdate + * + * @return int + */ + public function getUpdatedCount(): int + { + return $this->updatedCount; + } + + /** + * Mendapatkan statistik lengkap import + * + * @return array + */ + public function getImportStatistics(): array + { + return [ + 'total_processed' => $this->importedCount, + 'created' => $this->createdCount, + 'updated' => $this->updatedCount, + 'skipped' => $this->skippedCount, + 'errors' => count($this->errors) + ]; + } + + /** + * Mendapatkan jumlah data yang dilewati + * + * @return int + */ + public function getSkippedCount(): int + { + return $this->skippedCount; + } + + /** + * Mendapatkan daftar error yang terjadi + * + * @return array + */ + public function getErrors(): array + { + return $this->errors; + } +} diff --git a/app/Models/Bucok.php b/app/Models/Bucok.php new file mode 100644 index 0000000..f65d9f0 --- /dev/null +++ b/app/Models/Bucok.php @@ -0,0 +1,113 @@ + 'integer', + 'tanggal' => 'date', + 'tahun' => 'integer', + 'tanggal_penuh' => 'date', + 'nominal' => 'decimal:2', + 'umur_aging' => 'integer', + 'tanggal_penyelesaian' => 'date', + 'nominal_penyelesaian' => 'decimal:2', + 'nominal_berjalan' => 'decimal:2', + 'amortisasi_berjalan' => 'decimal:2', + 'sistem_berjalan' => 'decimal:2', + 'lainnya_berjalan' => 'decimal:2', + 'nominal_gantung' => 'decimal:2', + 'aset_gantung' => 'decimal:2', + ]; + + /** + * Field yang akan di-hidden saat serialization + */ + protected $hidden = [ + 'created_by', + 'updated_by', + 'deleted_by', + ]; +} diff --git a/database/migrations/2025_08_12_1003145_create_tickets_table.php b/database/migrations/2025_08_12_1003145_create_tickets_table.php new file mode 100644 index 0000000..d008465 --- /dev/null +++ b/database/migrations/2025_08_12_1003145_create_tickets_table.php @@ -0,0 +1,67 @@ +id(); + $table->string('no')->nullable(); // Nomor urut + $table->string('tanggal')->nullable(); // Tanggal + $table->string('bulan')->nullable(); // Bulan + $table->string('tahun')->nullable(); // Tahun + $table->string('tanggal_penuh')->nullable(); // Tanggal lengkap + $table->string('nomor_categ')->nullable(); // Nomor kategori + $table->string('coa_summary')->nullable(); // COA Summary + $table->string('nomor_coa')->nullable(); // Nomor COA + $table->string('nama_coa')->nullable(); // Nama COA + $table->string('nomor_tiket')->unique(); // Nomor tiket (unique) + $table->string('deskripsi')->nullable(); // Deskripsi + $table->string('nominal')->nullable(); // Nominal + $table->string('penyelesaian')->nullable(); // Penyelesaian + $table->string('umur_aging')->nullable(); // Umur aging + $table->string('cost_center')->nullable(); // Cost center + $table->string('nama_sub_direktorat')->nullable(); // Nama sub direktorat + $table->string('nama_direktorat_cabang')->nullable(); // Nama direktorat cabang + $table->string('tanggal_penyelesaian')->nullable(); // Tanggal penyelesaian + $table->string('nominal_penyelesaian')->nullable(); // Nominal penyelesaian + $table->string('nominal_berjalan')->nullable(); // Nominal berjalan + $table->string('amortisasi_berjalan')->nullable(); // Amortisasi berjalan + $table->string('sistem_berjalan')->nullable(); // Sistem berjalan + $table->string('lainnya_berjalan')->nullable(); // Lainnya berjalan + $table->string('nominal_gantung')->nullable(); // Nominal gantung + $table->string('aset_gantung')->nullable(); // Aset gantung + $table->string('keterangan_gantung')->nullable(); // Keterangan gantung + $table->string('lainnya_satu')->nullable(); // Lainnya satu + $table->string('lainnya_dua')->nullable(); // Lainnya dua + + // Standard Laravel fields + $table->timestamps(); + $table->string('created_by')->nullable(); + $table->string('updated_by')->nullable(); + $table->string('deleted_by')->nullable(); + $table->softDeletes(); + + // Indexes untuk performa + $table->index(['nomor_tiket']); + $table->index(['tanggal']); + $table->index(['tahun']); + $table->index(['nomor_coa']); + $table->index(['cost_center']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('bucoks'); + } +}; diff --git a/module.json b/module.json index a751cec..66789d2 100644 --- a/module.json +++ b/module.json @@ -413,6 +413,18 @@ "administrator", "noc" ] + }, + { + "title": "Bucok", + "path": "bucok", + "icon": "ki-filled ki-two-credit-cart text-lg text-primary", + "classes": "", + "attributes": [], + "permission": "", + "roles": [ + "administrator", + "noc" + ] } ] }, diff --git a/resources/views/bucok/index.blade.php b/resources/views/bucok/index.blade.php new file mode 100644 index 0000000..d47fad5 --- /dev/null +++ b/resources/views/bucok/index.blade.php @@ -0,0 +1,342 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render('bucok') }} +@endsection + +@section('content') +
+
+
+

+ Data Bucok +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + Export Excel + +
+
+
+
+
+ + + + + + + + + + + + + + + + +
+ + + + No + + + + + Tanggal + + + + + Nomor Tiket + + + + + Nomor COA + + + + + Nama COA + + + + + Deskripsi + + + + + Nominal + + + + + Cost Center + + + + + Status + + + Aksi
+
+ +
+
+
+ + + +@endsection + +@push('scripts') + + + +@endpush diff --git a/resources/views/bucok/show.blade.php b/resources/views/bucok/show.blade.php new file mode 100644 index 0000000..ed986fc --- /dev/null +++ b/resources/views/bucok/show.blade.php @@ -0,0 +1,236 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render('bucok.show', $bucok) }} +@endsection + +@section('content') +
+ +
+
+

Detail Bucok #{{ $bucok->nomor_tiket }}

+ +
+
+ + +
+ +
+
+

Informasi Dasar

+
+
+
+
+
+
No
+
{{ $bucok->no ?? '-' }}
+
+
+ +
+
+
Tanggal
+
+ {{ $bucok->tanggal ? dateFormat($bucok->tanggal, true) : '-' }}
+
+
+ +
+
+
Bulan
+
{{ $bucok->bulan ?? '-' }}
+
+
+ +
+
+
Tahun
+
{{ $bucok->tahun ?? '-' }}
+
+
+ +
+
+
Nomor Tiket
+
{{ $bucok->nomor_tiket }}
+
+
+ +
+
+
Status Penyelesaian
+
{!! $bucok->status_badge !!}
+
+
+
+
+
+ + +
+
+

Informasi COA

+
+
+
+
+
+
Nomor COA
+
{{ $bucok->nomor_coa ?? '-' }}
+
+
+ +
+
+
Nama COA
+
{{ $bucok->nama_coa ?? '-' }}
+
+
+ +
+
+
Deskripsi
+
{{ $bucok->deskripsi ?? '-' }}
+
+
+ +
+
+
Nominal
+
{{ $bucok->nominal_formatted }}
+
+
+
+
+
+
+ + +
+
+

Informasi Organisasi

+
+
+
+
+
+
Cost Center
+
{{ $bucok->cost_center ?? '-' }}
+
+
+ +
+
+
Sub Direktorat
+
{{ $bucok->nama_sub_direktorat ?? '-' }}
+
+
+ +
+
+
Direktorat/Cabang
+
{{ $bucok->nama_direktorat_cabang ?? '-' }}
+
+
+
+
+
+ + + @if ($bucok->tanggal_penyelesaian || $bucok->nominal_penyelesaian || $bucok->penyelesaian) +
+
+

Informasi Penyelesaian

+
+
+
+
+
+
Tanggal Penyelesaian
+
+ {{ $bucok->tanggal_penyelesaian ? dateFormat($bucok->tanggal_penyelesaian, true) : '-' }} +
+
+
+ +
+
+
Nominal Penyelesaian
+
+ {{ $bucok->nominal_penyelesaian_formatted }}
+
+
+ +
+
+
Penyelesaian
+
{{ $bucok->penyelesaian ?? '-' }}
+
+
+ +
+
+
Umur Aging
+
{{ $bucok->umur_aging ?? '-' }} hari
+
+
+ + @if ($bucok->keterangan_gantung) +
+
+
Keterangan Gantung
+
{{ $bucok->keterangan_gantung }}
+
+
+ @endif +
+
+
+ @endif + + +
+
+

Informasi Audit

+
+
+
+
+
+
Dibuat Oleh
+
{{ $bucok->creator?->name ?? '-' }}
+
+
+ +
+
+
Tanggal Dibuat
+
{{ dateFormat($bucok->created_at, true) }}
+
+
+ +
+
+
Diperbarui Oleh
+
{{ $bucok->updater?->name ?? '-' }}
+
+
+ +
+
+
Tanggal Diperbarui
+
{{ dateFormat($bucok->updated_at, true) }}
+
+
+
+
+
+
+@endsection diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php index 2dfe2ea..dbe3698 100644 --- a/routes/breadcrumbs.php +++ b/routes/breadcrumbs.php @@ -806,7 +806,15 @@ Breadcrumbs::for('memo.preview', function (BreadcrumbTrail $trail) { $trail->push('Preview', route('memo.index')); }); +// Breadcrumb untuk Bucok +Breadcrumbs::for('bucok', function (BreadcrumbTrail $trail) { + $trail->push('Data Bucok', route('bucok.index')); +}); +Breadcrumbs::for('bucok.show', function (BreadcrumbTrail $trail, $bucok) { + $trail->parent('bucok'); + $trail->push('Detail Bucok #' . $bucok->nomor_tiket); +}); // add andy require __DIR__ . '/breadcrumbs_registrasi.php'; diff --git a/routes/web.php b/routes/web.php index 819fdf5..b89d4f2 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,58 +1,59 @@ group(function () { Route::resource('category-daftar-pustaka', CategoryDaftarPustakaController::class); + // Route untuk Bucok + Route::prefix('bucok')->name('bucok.')->group(function () { + Route::get('/', [BucokController::class, 'index'])->name('index'); + Route::get('/datatables', [BucokController::class, 'dataForDatatables'])->name('datatables'); + Route::get('/{id}', [BucokController::class, 'show'])->name('show'); + Route::post('/import', [BucokController::class, 'import'])->name('import'); + }); }); require __DIR__ . '/registrasi.php';