jeudi 16 mai 2019

How to apply target a category or subcategory id no. and apply different properties to it

I am setting up a meta title for my website. I want to be able to apple different title for my categories and subcategories. examples below

if category id is 4 (use this title 'Buy from us') if categey id is 6 (use this title 'Cars for sale in Canada') if subcategori id is 324 (use this title 'Accessories in the best') etc

i have tried this but didnt work

 if (cat->id=3){
    $title .= ' in ' . config('country.name') .' for sale | Prices on Lata.ng | Buy and sell online';
}
    if (cat->id=6){
$title .= ' in ' . config('country.name') .' for Buy| Best on Yakata.ng |';
}       
    view()->share('title', $title);  
    return $title;


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire