3 months ago

Using Middleware in Dispatching Queue

Posted 3 months ago by geetpurwar


I need a bit of help here. I am using following function which seems fine with using middleware.

Route::get('push', function(){
    $product = \App\Product::find(5028);
    return "Done";

However, I need to dispatch this via queue job and this is providing me error as I am not able to use middleware in jobs.

Route::get('push', function(){

Anyone please suggest how do I use middleware in queues. Thanks.

Please sign in or create an account to participate in this conversation.