1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- use Illuminate\Support\Facades\Route;
- use App\Http\Controllers\HomeController;
- use App\Http\Controllers\ProductController;
- use App\Http\Controllers\PageController;
- use App\Http\Controllers\ContactController;
- use App\Http\Controllers\VideoController;
- use App\Http\Controllers\DemoController;
- use App\Http\Controllers\SitemapController;
- use App\Http\Controllers\CollectionController;
- Route::get('/demo', [DemoController::class, 'index'])->name('demo');
- Route::get('/', [HomeController::class, 'index'])->name('home');
- Route::prefix('products')->group(function () {
- Route::get('/', [ProductController::class, 'index'])->name('products.index');
- Route::get('/{id}', [ProductController::class, 'detail'])->name('products.detail');
- Route::get('/categories/{categoryId}', [ProductController::class, 'category'])->name('products.category');
- });
- Route::prefix('videos')->group(function () {
- Route::get('/', [VideoController::class, 'index'])->name('videos.index');
- Route::get('/{id}', [VideoController::class, 'detail'])->name('videos.detail');
- Route::get('/categories/{categoryId}', [VideoController::class, 'category'])->name('videos.category');
- });
- Route::prefix('pages')->group(function () {
- Route::get('/', [PageController::class, 'list'])->name('page.list');
- Route::get('/{slug}', [PageController::class, 'detail'])->name('page.detail');
- });
- Route::prefix('contact')->group(function () {
- Route::get('/', [ContactController::class, 'create'])->name('contact.create');
- Route::post('/', [ContactController::class, 'store'])->name('contact.store');
- });
- Route::prefix('collections')->group(function () {
- Route::get('/{slug}', [CollectionController::class, 'detail'])->name('collection.detail');
- });
- Route::get('/sitemap.xml', [SitemapController::class, 'index'])->name('sitemap.index');
|