PHP code example of robwittman / laravel-shopify-plugin

1. Go to this page and download the library: Download robwittman/laravel-shopify-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/ */

    

robwittman / laravel-shopify-plugin example snippets



# domain = 'https://app.com';
'webhooks' => array(
    'shop/update',
    'app/uninstalled' => 'my/custom/webhook',
    'products/create' => array(
        'endpoint1',
        'https://custom-api.com/products/create'
    )
);


#domain => 'https://app.com';
'script_tags' => array(
    '/js/script.js',                # installs https://app.com/js/script.js
    'https://cdn.com/js/script2.js' # installs https://cdn.com/js/script2.js'
);



protected $listen = [
    'LaravelShopifyPlugin\Events\ShopInstalled' => [
        'LaravelShopifyPlugin\Listeners\InstallWebhooks',
        'LaravelShopifyPlugin\Listeners\InstallScriptTags'
    ],
];