add page_title to configs

This commit is contained in:
Constantin Plaiasu 2024-08-28 21:40:08 +03:00
parent 4736616ec1
commit 6ccbc8b0bc
2 changed files with 3 additions and 3 deletions

View file

@ -61,7 +61,7 @@ public function movies( ApiClient $api, TmdbClient $tmdb, ?int $page = 1,)
$results = $this->formatApiResponse($api->getPopularMovies($page, 36),true, ['name' => Route::current()->getName()]); $results = $this->formatApiResponse($api->getPopularMovies($page, 36),true, ['name' => Route::current()->getName()]);
$meta['title'] = config('site.movies.list.title', 'Popular Movies'); $meta['title'] = config('site.movies.list.title', 'Popular Movies');
if ($page > 1) $meta['title'] .= sprintf(' - Page %s', $page); if ($page > 1) $meta['title'] .= sprintf(' - Page %s', $page);
$meta['page_title'] = config('site.movies.list.title', 'Popular Movies'); $meta['page_title'] = config('site.movies.list.page_title', 'Popular Movies');
$meta['description'] = config('site.movies.list.description', 'Popular Movies'); $meta['description'] = config('site.movies.list.description', 'Popular Movies');
$meta['keywords'] = config('site.movies.list.keywords'); $meta['keywords'] = config('site.movies.list.keywords');
$meta['image'] = asset('images/cover.jpg'); $meta['image'] = asset('images/cover.jpg');
@ -105,7 +105,7 @@ public function genres( ApiClient $api, TmdbClient $tmdb, string $genre, ?int $p
$results = $this->formatApiResponse($api->getGenreMovies($genre->id, $page, 36), true, ['name' => Route::current()->getName(), 'params' => ['genre' => $genre->slug]]); $results = $this->formatApiResponse($api->getGenreMovies($genre->id, $page, 36), true, ['name' => Route::current()->getName(), 'params' => ['genre' => $genre->slug]]);
$meta['title'] = sprintf(config('site.movies.genres.title', 'Genre Movies'), $genre->name); $meta['title'] = sprintf(config('site.movies.genres.title', 'Genre Movies'), $genre->name);
if ($page > 1) $meta['title'] .= sprintf(' - Page %s', $page); if ($page > 1) $meta['title'] .= sprintf(' - Page %s', $page);
$meta['page_title'] = sprintf(config('site.movies.genres.title', 'Genre Movies'), $genre->name); $meta['page_title'] = sprintf(config('site.movies.genres.page_title', 'Genre Movies'), $genre->name);
$meta['description'] = sprintf(config('site.movies.genres.description', 'Genre Movies'), $genre->name); $meta['description'] = sprintf(config('site.movies.genres.description', 'Genre Movies'), $genre->name);
$meta['keywords'] = config('site.movies.genres.keywords', null); $meta['keywords'] = config('site.movies.genres.keywords', null);
$meta['image'] = asset('images/cover.jpg'); $meta['image'] = asset('images/cover.jpg');

View file

@ -157,7 +157,7 @@ public function shows( ApiClient $api, TmdbClient $tmdb, ?int $page = 1,)
$results = $this->formatApiResponse($api->getPopularShows($page, 36), true, ['name' => Route::current()->getName()]); $results = $this->formatApiResponse($api->getPopularShows($page, 36), true, ['name' => Route::current()->getName()]);
$meta['title'] = config('site.shows.list.title', 'Popular Shows'); $meta['title'] = config('site.shows.list.title', 'Popular Shows');
if ($page > 1) $meta['title'] .= sprintf(' - Page %s', $page); if ($page > 1) $meta['title'] .= sprintf(' - Page %s', $page);
$meta['page_title'] = config('site.shows.list.title', 'Popular Shows'); $meta['page_title'] = config('site.shows.list.page_title', 'Popular Shows');
$meta['description'] = config('site.shows.list.description', 'Popular Shows'); $meta['description'] = config('site.shows.list.description', 'Popular Shows');
$meta['keywords'] = config('site.shows.list.keywords', false); $meta['keywords'] = config('site.shows.list.keywords', false);
$meta['image'] = asset('images/cover.jpg'); $meta['image'] = asset('images/cover.jpg');