main
Ilham Wara Nugroho 2026-03-04 09:20:53 +07:00
parent ca23f598b3
commit ee48ee92ef
4 changed files with 1 additions and 27 deletions

View File

@ -398,12 +398,4 @@ class DatasetController extends Controller
return view($this->template.'.download',$data); return view($this->template.'.download',$data);
} }
function download2025($id){
$keyId = decode_id($id);
$data['dataset'] = Dataset::with(['tabelData'])->find($keyId);
return view($this->template.'.download2025',$data);
}
} }

View File

@ -25,7 +25,7 @@
<i data-lucide="download" class="w-5 h-5 mr-2"></i> Unduh Data <i data-lucide="download" class="w-5 h-5 mr-2"></i> Unduh Data
</a> </a>
@else @else
<a href="{{url('opendata/dataset/download2025/'.encode_id(@$dataset->DatasetId))}}" class="flex-1 md:flex-none bg-blue-600 text-white px-6 py-3 rounded-xl font-bold hover:bg-blue-700 transition-all flex items-center justify-center shadow-lg shadow-blue-100"> <a href="{{asset('uploads/'.@$dataset->file)}}" class="flex-1 md:flex-none bg-blue-600 text-white px-6 py-3 rounded-xl font-bold hover:bg-blue-700 transition-all flex items-center justify-center shadow-lg shadow-blue-100">
<i data-lucide="download" class="w-5 h-5 mr-2"></i> Unduh Data <i data-lucide="download" class="w-5 h-5 mr-2"></i> Unduh Data
</a> </a>
@endif @endif

View File

@ -1,17 +0,0 @@
<?php
// header("Content-type: application/vnd.ms-excel");
// header("Content-Disposition: attachment; filename=Data {$dataset->name}.xls");
// header("Pragma: no-cache");
?>
<table border="1" width="100%">
<tr style="vertical-align:middle;">
@if (!empty($data))
@foreach ($data[0] as $k => $key)
<td style="background:#ddd;">{{ ucwords(str_replace('_', ' ', $k)) }}</td>
@endforeach
@endif
</tr>
</table>

View File

@ -47,7 +47,6 @@ Route::post('login',[CustomLoginController::class,'post_login'])->name('post_log
Route::get('register',[CustomRegisterController::class,'index'])->name('register'); Route::get('register',[CustomRegisterController::class,'index'])->name('register');
Route::post('register',[CustomRegisterController::class,'post_register'])->name('post_register'); Route::post('register',[CustomRegisterController::class,'post_register'])->name('post_register');
Route::get('opendata/dataset/download/{id?}',[DatasetController::class,'download'])->name('download'); Route::get('opendata/dataset/download/{id?}',[DatasetController::class,'download'])->name('download');
Route::get('opendata/dataset/download2025/{id?}',[DatasetController::class,'download2025'])->name('download2025');
Route::get('getInstansi/{type}',[AjaxController::class,'getInstansi'])->name('getInstansi'); Route::get('getInstansi/{type}',[AjaxController::class,'getInstansi'])->name('getInstansi');