2017 © Pedro Peláez
 

package jsonid

PHP Laravel JSON ID

image

eder/jsonid

PHP Laravel JSON ID

  • Thursday, September 28, 2017
  • by faneder
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

json-ld-laravel

A Simple Way To Generate The JSON LD, (*1)

Configure

Setting up you information on config/jsonLd.php

Example

SearchAction

$this->jsonLd = new JsonLd;

$context = ['@context' => 'http://schema.org'];
$type    = ['@type' => 'WebSite'];
$data    = [
    'url' => $this->companyUrl,
    'potentialAction' => [
        '@type'       => 'SearchAction',
        'target'      => 'https://www.bookmarc.com.au/au/search/{search_term_string}',
        'query-input' => 'required name=search_term_string'
    ]
];

socialProfile

$this->jsonLd = new JsonLd;

$context = ['@context' => 'http://schema.org'];
$type    = ['@type' => 'Organization'];
$data    = [
    'url' => $this->companyUrl,
    'sameAs' => config('companyInfo.socialProfile')
];

$script = $this->jsonLd
            ->context($context)
            ->type($type)
            ->data($data)
            ->getScriptJsonLd();

The Versions

28/09 2017

dev-master

9999999-dev

PHP Laravel JSON ID

  Sources   Download

MIT

The Requires

 

The Development Requires

by Eder

laravel php jsonld