PHP code example of vdlp / oc-schemaorg-plugin

1. Go to this page and download the library: Download vdlp/oc-schemaorg-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vdlp / oc-schemaorg-plugin example snippets


/** @var \Illuminate\Contracts\Events\Dispatcher $eventDispatcher */
$eventDispatcher = resolve(\Illuminate\Contracts\Events\Dispatcher::class);

$eventDispatcher->listen(\Vdlp\SchemaOrg\Classes\Events\FetchStructuredData::class, static function () {
    return \Spatie\SchemaOrg\Schema::localBusiness()
        ->name('VDLP')
        ->email('[email protected]')
        ->contactPoint(\Spatie\SchemaOrg\Schema::contactPoint()->areaServed('Worldwide'));
});