This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

sehan
sehan

laravel already announce in laravel 5.3 that queue closure is no longer support

in this statement https://laravel.com/docs/5.3/upgrade#upgrade-5.3.0

I tried to use queue closure for making a simple jobs, like this:

protected function toValidateEmployee($period)
    {
        Queue::push(function($job) use ($period) {

            if(!$period){
                $job->delete();
                return;
            };

            $manager = Manager::instance();
            $manager->validate($period);

            $job->delete();
        });

        $param = ['company_id' => $this->company->id, 'period_id' => $period->id];

        return $this->controller->pageUrl('account/loading', $param);
    }

but when executed, it throwing error like this:

"Closure object cannot have properties" on line 123 of projects/vendor/laravel/framework/src/Illuminate/Queue/Queue.php

I know it works when I create own jobs class handler, but I want to pick the other options to do,

create handler class for firing some tiny piece function I think it's waste

do you guys have recommendations to create simple queue jobs without making new class.. thank you..

sorry for my bad english pronounciation

Last updated

Dolphin
Dolphin

Same problem... wtf

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.