<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
codeinternetapplications / shopify-oauth example snippets
// $app->withFacades();
// $app->withEloquent();
$router->group([
'middleware' => [
'shopify-hostname-validation',
'shopify-hmac-validation',
'shopify-oauth-handler',
]
], function() use ($router) {
// Redirect to Polaris view
$router->addRoute(['GET','POST','PUT'], '/[{page}]', function () {
return view('polaris');
});
});
protected $listen = [
'CodeInternetApplications\ShopifyOauth\Events\PostShopifyCallbackEvent' => [
'App\Listeners\PostShopifyCallbackListener', // assuming that your listener is located at App\Listeners\PostShopifyCallbackListener
],
];
namespace App\Listeners;
use CodeInternetApplications\ShopifyOauth\Events\PostShopifyCallbackEvent;
class PostShopifyCallbackListener
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param PostShopifyCallbackEvent $event
* @return void
*/
public function handle(PostShopifyCallbackEvent $event)
{
// log
\Log::channel('stack')->info('PostShopifyCallbackEvent is triggered', []);
}
}
php artisan migrate
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.