artesaos / seotools

SEO Tools for Laravel
MIT License
3.04k stars 503 forks source link

Do you have some sort of conditional #258

Closed ap-coder closed 2 years ago

ap-coder commented 2 years ago

do you have some sort of conditional to check if view has seo data

example

@if(SEOTools) or @has(SEOTools)

gtu-myowin commented 2 years ago

It's in the doc

SEOTools::getTitle($session = false);
// Retrieving data
SEOMeta::getTitle();
SEOMeta::getTitleSession();
SEOMeta::getTitleSeparator();

To achieve what you want

@if(empty(SEOTools::getTitle())) // then the title isn't set or set to empty string