Class does not exist octobercms

Viewed 1204

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?

2 Answers

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.

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

Related