Files
movies/app/Http/Controllers/ShowController.php
T

26 lines
550 B
PHP
Raw Normal View History

2025-02-10 01:58:12 +02:00
<?php
namespace App\Http\Controllers;
use App\Models\Show;
use Illuminate\Http\Request;
class ShowController extends Controller
{
public function index()
{
$shows = Show::paginate(48);
return view('show.index', compact('shows'));
}
public function show(string $slug)
{
$show = Show::with('posters', 'backdrops', 'externalIds', 'networks', 'genres', 'productionCompanies')->where('slug', $slug)->first();
$comments = [];
return view('show.show', compact('show', 'comments'));
}
}