Files
echoscoop/routes/web.php
Charles Teh c9c6004694 Add (debugbar)
Update (post detail): Show detailed post
Update (post url): Improve url structure
2023-10-04 21:15:51 +08:00

36 lines
1.8 KiB
PHP

<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::feeds('feeds');
Route::get('/', [App\Http\Controllers\Front\FrontHomeController::class, 'home'])->name('front.home');
Route::get('/terms', [App\Http\Controllers\Front\FrontHomeController::class, 'terms'])->name('front.terms');
Route::get('/privacy', [App\Http\Controllers\Front\FrontHomeController::class, 'privacy'])->name('front.privacy');
Route::get('/disclaimer', [App\Http\Controllers\Front\FrontHomeController::class, 'disclaimer'])->name('front.disclaimer');
Route::get('/news', [App\Http\Controllers\Front\FrontListController::class, 'index'])->name('front.all');
Route::get('/news/{slug}', [App\Http\Controllers\Front\FrontPostController::class, 'redirect'])->name('front.post.redirect');
Route::get('/{category_slug}/{slug}', [App\Http\Controllers\Front\FrontPostController::class, 'index'])->name('front.post');
Route::get('/{category_slug}', [App\Http\Controllers\Front\FrontListController::class, 'category'])
->where('category_slug', '^(automotive|business|trading|information-technology|marketing|office|telecommunications|food-drink|collectibles|pets|photography|hobbies-gifts|hunting-fishing|law|politics|home-garden|shopping|fashion-clothing|real-estate|family|wedding|immigration|society|education|languages|health|beauty|psychology|wellness|religion-spirituality|tips-tricks|how-to|holiday|world-festivals|travel|outdoors|computer|phones|gadgets|technology|social-networks|ai)$')
->name('front.category');