26 lines
550 B
PHP
26 lines
550 B
PHP
<?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'));
|
|
}
|
|
}
|