Laravel:Interface' Illuminate \ Contracts \ Queue \ QueueableCollection'未找到

时间:2017-07-27 15:05:23

标签: php laravel

我正在创建一个控制台(Artisan)命令来运行一个定制的包。包的导入及其所有功能都运行得很好,但我似乎无法查询任何雄辩的模型而不会弹出以下错误:

[Symfony\Component\Debug\Exception\FatalErrorException]   
Interface 'Illuminate\Contracts\Queue\QueueableCollection' not found

这是我的代码......

<?php

namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Property;
use Sync;

class SyncTool extends Command {

    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'sync:all';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $credentials = [
            ...
        ];

        $sync = new Sync( $credentials );

        $properties = Property::all(); // this throws the error

    }


}

1 个答案:

答案 0 :(得分:0)

Step 1 : Remove full vendor folder 
Step 2:  delete /bootstrap/cache/services.php, /bootstrap/cache/compiled.php
Step 3 : Run from your terminal composer install

试试这个