37 lines
1.3 KiB
PHP
37 lines
1.3 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;
|
||
|
|
||
|
|
||
|
/*
|
||
|
|--------------------------------------------------------------------------
|
||
|
| 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('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('/search', [HomeController::class, 'search'])->name('search');
|