123movies-seo/routes/web.php

49 lines
1.7 KiB
PHP

<?php
use App\Http\Controllers\HomeController;
use App\Http\Controllers\MovieController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\ShowController;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\PeopleController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::pattern('page', '\d+');
Route::pattern('season', '\d+');
Route::pattern('id', '[0-9]+');
Route::pattern('person_id', '[0-9]+');
Route::pattern('p', 'page');
Route::pattern('country', '[a-z]{2}');
Route::get('/', [HomeController::class, 'index'])->name('home');
Route::get('/movies/{page?}', [MovieController::class, 'movies'])->name('movies');
Route::get('/movies/{genre}/{page?}', [MovieController::class, 'genres'])->name('movies.genre');
Route::get('/tv-shows/{page?}', [ShowController::class, 'shows'])->name('shows');
Route::get('/movie/{id}/{slug}', [MovieController::class, 'index'])->name('movie');
Route::get('/series/{id}/{slug}', [ShowController::class, 'index'])->name('show');
Route::get('/series/{id}/{slug}/season/{season}', [ShowController::class, 'season'])->name('show.season');
Route::get('/person/{person_id}/{slug}', [PeopleController::class, 'index'])->name('person');
Route::get('/search', [HomeController::class, 'search'])->name('search');
Route::fallback([HomeController::class, 'index'])->name('fallback');