Laravel SEO (I) Add Meta Tags in Laravel 8 E-commerce Website | Laravel Search Engine Optimisation

Published: 01 January 1970
on channel: Stack Developers
4,191
55

In Part-179 of Laravel E-commerce Series, we will work on SEO for our E-commerce website. SEO i.e Search Engine Optimization helps to improve the website ranking in Google and other search engines. Meta Tags is essential for SEO that we are going to integrate in our website pages.

Meta tags are invisible tags that provide data about your page to search engines and website visitors. In short, they make it easier for search engines to determine what your content is about, and thus are vital for SEO.

We are going to add meta tags for Home Page, Listing Pages, Detail Page, Shopping Cart Page, Checkout, Order Review, Payment Page, CMS Pages, Contact Us page and other pages.

Meta Tags for Home Page :-

1) Update index function :-
First of all, we will update index function to return meta_title, meta_description and meta_keywords variables to front_layout.blade.php file.

2) Update front_layout.blade.php :-
Now add conditions to show meta_title, meta_description and meta_keywords at front_layout.blade.php file.

Now meta tags for home page appear.

Now we will show meta tags for listing page.

3) Update catDetails function :-
We need to update catDetails function at Category model to add meta_title, meta_description and meta_keywords columns in select query.

4) Update listing function :-
Now, update listing function to return meta_title, meta_description and meta_keywords variables to front_layout.blade.php file. We already have option in admin panel to update these meta tags for categories.

Now meta tags for listing pages appear.

Now we will show meta tags for detail page.

5) Update detail function :-
Now, update detail function to return meta_title, meta_description and meta_keywords variables to front_layout.blade.php file. We will assign product name to meta_title and meta_keywords and product description to meta_description variables.

Now meta tags for detail pages appear.

Now we will show meta tags for cms pages.

6) Update cmsPage function :-
Now, update cmsPage function to return meta_title, meta_description and meta_keywords variables to front_layout.blade.php file. We already have option in admin panel to update these meta tags for CMS Pages.

7) Update Other Pages Meta Tags :-
We will also update meta tags for other pages like cart, checkout and payment pages as shown in video.

Join this channel to get complete code/support :-
   / @stackdevelopers  


Watch video Laravel SEO (I) Add Meta Tags in Laravel 8 E-commerce Website | Laravel Search Engine Optimisation online without registration, duration hours minute second in high quality. This video was added by user Stack Developers 01 January 1970, don't forget to share it with your friends and acquaintances, it has been viewed on our site 4,191 once and liked it 55 people.