2024-08-24 23:08:42 +03:00
|
|
|
<?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;
|
2024-08-29 05:49:54 +03:00
|
|
|
use App\Http\Controllers\PeopleController;
|
2024-08-24 23:08:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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]+');
|
2024-08-29 05:49:54 +03:00
|
|
|
Route::pattern('person_id', '[0-9]+');
|
2024-08-24 23:08:42 +03:00
|
|
|
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');
|
2024-08-30 19:49:30 +03:00
|
|
|
|
|
|
|
Route::group(['prefix' => '/series'], function(){
|
|
|
|
Route::get('/{id}/{slug}', [ShowController::class, 'index'])->name('show');
|
|
|
|
Route::get('/{id}/{slug}/season/{season}', [ShowController::class, 'season'])->name('show.season');
|
|
|
|
Route::get('/{id}/{slug}/season/{season}/episode/{episode}', [ShowController::class, 'episode'])->name('show.episode');
|
|
|
|
});
|
|
|
|
|
2024-08-29 05:49:54 +03:00
|
|
|
Route::get('/person/{person_id}/{slug}', [PeopleController::class, 'index'])->name('person');
|
2024-08-24 23:08:42 +03:00
|
|
|
Route::get('/search', [HomeController::class, 'search'])->name('search');
|
2024-08-28 03:05:53 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Route::fallback([HomeController::class, 'index'])->name('fallback');
|