"https://schema.org", "@type" => "LocalBusiness", "name" => $config['company']['name'], "image" => $config['urls']['logo'], "url" => $config['urls']['base'], "telephone" => $config['phone']['sales'], "address" => [ "@type" => "PostalAddress", "streetAddress" => $config['company']['address']['street'], "addressLocality" => $config['company']['address']['city'], "addressRegion" => $config['company']['address']['state'], "postalCode" => $config['company']['address']['postal_code'], "addressCountry" => $config['company']['address']['country'], ], "geo" => [ "@type" => "GeoCoordinates", "latitude" => $config['company']['geo']['latitude'], "longitude" => $config['company']['geo']['longitude'], ], "priceRange" => "$$", ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); } function generateOrganizationSchema($config) { return json_encode([ "@context" => "https://schema.org", "@type" => "Organization", "name" => $config['company']['name'], "url" => $config['urls']['base'], "logo" => $config['urls']['logo'], "contactPoint" => [ "@type" => "ContactPoint", "telephone" => $config['phone']['sales'], "contactType" => "sales", "areaServed" => "IN", "availableLanguage" => ["English", "Hindi"], ], "sameAs" => [ $config['social']['facebook'], $config['social']['linkedin'], "https://twitter.com/" . ltrim($config['social']['twitter'], '@'), ], ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); } function generateSoftwareApplicationSchema($name, $description, $rating = "5", $reviewCount = "4999") { return json_encode([ "@context" => "https://schema.org", "@type" => "SoftwareApplication", "name" => $name, "description" => $description, "operatingSystem" => "Web, Android, iOS", "applicationCategory" => "BusinessApplication", "aggregateRating" => [ "@type" => "AggregateRating", "ratingValue" => $rating, "ratingCount" => $reviewCount, ], ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); } function generateFAQSchema($faqs) { $mainEntity = array_map(function($faq) { return [ "@type" => "Question", "name" => $faq['question'], "acceptedAnswer" => [ "@type" => "Answer", "text" => $faq['answer'], ], ]; }, $faqs); return json_encode([ "@context" => "https://schema.org", "@type" => "FAQPage", "mainEntity" => $mainEntity, ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); }