Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Accessing shop data in webhook jobs #653

Answered by gnikyt
nikunj-devops asked this question in Q&A
Discussion options

You must be logged in to vote

Heres an example job with some stuff stripped out, take a look at handle.

<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Osiset\ShopifyApp\Objects\Values\ShopDomain;
use Osiset\ShopifyApp\Contracts\Queries\Shop as ShopQuery;

class DummyJob implements ShouldQueue
{
    use Dispatchable;
    use InteractsWithQueue;
    use Queueable;
    use SerializesModels;

    /**
     * The shop domain.
     * Initially starts as string in contstructor to allow for serialization.
     * Handle method converts it to a shop…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shartouny
Comment options

Answer selected by nikunj-devops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants