refactor: update foto routes to use slug instead of id for better SEO

This commit is contained in:
LailaWulandarii 2026-01-12 20:50:23 +07:00
parent f6bcf71f84
commit 237d44cedd
2 changed files with 5 additions and 4 deletions

View File

@ -28,7 +28,8 @@
<p class="bookingfoto-product-price">Rp {{ number_format($f->harga, 0, ',', '.') }}
</p>
</div>
<a href="{{ route('detail.foto', $f->id_paket) }}" class="stretched-link"></a>
<a href="{{ route('detail.foto', $f->id_paket . '-' . Str::slug($f->nama)) }}"
class="stretched-link"></a>
</div>
</div>
@empty

View File

@ -16,12 +16,12 @@
// Fitur Buket
Route::get('/pesan-buket', [User\PesanBuketController::class, 'index'])->name('pesan.buket');
Route::get('/pesan-buket/{id}', [User\PesanBuketController::class, 'detail'])->name('detail.buket');
Route::get('/formulir-buket/{id}', [User\PesanBuketController::class, 'formulir'])->name('formulir.buket');
Route::get('/pesan-buket/{slug_id}', [User\PesanBuketController::class, 'detail'])->name('detail.buket');
Route::get('/formulir-buket/{slug_id}', [User\PesanBuketController::class, 'formulir'])->name('formulir.buket');
Route::post('/formulir-buket/store', [User\PesanBuketController::class, 'store'])->name('transaksi.buket.store');
// Fitur Foto
Route::get('/booking-foto', [User\BookingFotoController::class, 'index'])->name('booking.foto');
Route::get('/detail-paket-foto/{id}', [User\BookingFotoController::class, 'detail'])->name('detail.foto'); // Tambah {id}
Route::get('/detail-paket-foto/{slug_id}', [User\BookingFotoController::class, 'detail'])->name('detail.foto'); // Tambah {id}
Route::get('/formulir-pemesanan-foto', [User\BookingFotoController::class, 'formulir'])->name('formulir.foto');
Route::get('/load-calendar', [User\BookingFotoController::class, 'loadCalendar'])->name('ajax.load-calendar');