Advertisements

How to add QA Schema in Laravel Views

Advertisements

How to add QA Schema in Laravel Views

Just add this code in head section of your layout view

<script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "QAPage",
      "mainEntity": {
        "@type": "Question",
        "name": "Question Title",
        "text": "Question Description",
        "answerCount": 1,
        "acceptedAnswer": {
          "@type": "Answer",
          "upvoteCount": 10,
          "text": "Answer Description",
          "url": "https://example.com/post-url"
          },
      "suggestedAnswer": [
      {
        "@type": "Answer",
        "text": "Answer 1 Description",
        "upvoteCount": 42,
        "url": "https://example.com/question1#suggestedAnswer1"
      }, {
        "@type": "Answer",
        "text": "Answer 2 Description",
        "upvoteCount": 10,
        "url": "https://example.com/question1#suggestedAnswer2"
      }
    ]
      }
    }
</script>

QA Schema key values you can read here in detail.

After adding Test Schema here.

For more code examples click here.