Мета-описание для индексной страницы, не отображаемой в рамках laravel - PullRequest
0 голосов
/ 28 сентября 2019

У меня есть 3 набора URL (страница индекса, страница сведений и страница обзора).Для страницы сведений и страницы обзора отображается мета-описание, но не на странице указателя.

@if(strpos(Route::getFacadeRoot()->current()->uri(), 'reviews') !== false && isset($movie_review->description))
    <meta name="description" content="{{isset($movie->title)?'Watch '.$movie->title.' online. '.$movie_review->description}}"> 
@elseif(strpos(Route::getFacadeRoot()->current()->uri(), 'detail') !== false && isset($movie->overview))
    <meta name="description" content="{{isset($movie->title)?'Watch '.$movie->title.' online. '.$movie->overview}}"> \ 
**@elseif(strpos(Route::getFacadeRoot()->current()->uri(), 'index') !== false)
    <meta name="description" content="{'This is index page description!'}">** 
@endif

1 Ответ

0 голосов
/ 28 сентября 2019

Заменить index на /, как указано ниже:

@elseif(strpos(Route::getFacadeRoot()->current()->uri(), '/') !== false)
   <meta name="description" content="This is index page description!">
@endif
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...