hot fix advertisement route conflict

This commit is contained in:
arifal
2025-03-04 15:58:30 +07:00
parent 43a246d234
commit 8fcf8859d6
3 changed files with 3 additions and 5 deletions

View File

@@ -73,7 +73,7 @@ document.addEventListener("DOMContentLoaded", function () {
}, 2000); }, 2000);
setTimeout(() => { setTimeout(() => {
window.location.href = "/data/advertisements/index"; window.location.href = "/data/web-advertisements";
}, 1000); }, 1000);
} else { } else {
if (authLogo) { if (authLogo) {

View File

@@ -39,7 +39,7 @@ console.log(dropzonePreviewNode);
"Upload Files"; "Upload Files";
// Tunggu sebentar lalu reload halaman // Tunggu sebentar lalu reload halaman
setTimeout(() => { setTimeout(() => {
window.location.href = "/data/advertisements/index"; window.location.href = "/data/web-advertisements";
}, 2000); }, 2000);
}); });
// Listen for the error event // Listen for the error event

View File

@@ -77,9 +77,7 @@ Route::group(['middleware' => 'auth'], function(){
// data // data
Route::group(['prefix' => '/data'], function(){ Route::group(['prefix' => '/data'], function(){
// Resource route, kecuali create karena dibuat terpisah // Resource route, kecuali create karena dibuat terpisah
Route::resource('/advertisements', AdvertisementController::class)->except(['create', 'show', 'index']); Route::resource('/web-advertisements', AdvertisementController::class)->except(['create', 'show']);
Route::get('/advertisements/index', [AdvertisementController::class, 'index'])->name('web.advertisements.index');
// Rute khusus untuk create dan bulk-create // Rute khusus untuk create dan bulk-create
Route::get('/advertisements/create', [AdvertisementController::class, 'create'])->name('advertisements.create'); Route::get('/advertisements/create', [AdvertisementController::class, 'create'])->name('advertisements.create');