2

I'm new in october cms and I want to push a job in queue but when I writing bottom code in my controller, I got error for class not exist !
I already create my class in classes folder of plugin ...

       Queue::push('\Mori\News\Classes\Insta', ['message' => "hello"]);

place of file that i made

the error I got:

Class \Mori\News\Classes\Insta does not exist **\xampp\htdocs\vendor\laravel\framework\src\Illuminate\Container\Container.php line 752

How could I solve this issue?

Marcel Gosselin
  • 4,610
  • 2
  • 31
  • 54
mortezaa
  • 21
  • 2

2 Answers2

1

I guess you are missing jobs folder

code should be like this

Queue::push('\Mori\News\Classes\Jobs\Insta', ['message' => "hello"]);

according to your pic it seems it is inside jobs folder so just add it as well.

if any doubt please comment.

Hardik Satasiya
  • 9,547
  • 3
  • 22
  • 40
0

I think you should try first composer dump-autoload. If not work then composer update command may be your issue was solved.

Kaushik shrimali
  • 1,178
  • 8
  • 15