I have 3 sets of URL (index page, detail page and review page). For detail page and review page, meta description are appearing but not in index page.
@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
Advertisement
Answer
Replace index
with /
as given below:
@elseif(strpos(Route::getFacadeRoot()->current()->uri(), '/') !== false) <meta name="description" content="This is index page description!"> @endif