Laravel 7 And Scout Extended


I’m trying to implement Algolia’s scout extended on my Laravel 7. Everything seems to be fine until I’m launching :

php artisan scout:import

I’m getting an error :

    [OK] All [App\Models\City] records have been flushed.

In Container.php line 978:

  Target [Illuminate\Contracts\Bus\Dispatcher] is not instantiable.

I’ve actually tried everything and searched all over stackoverflow and the web, and cannot find any convenient solution.

Here’s a piece of my City model :

namespace App\Models;

use Laravel\Scout\Searchable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Bus\Dispatcher;

 * Class City
 * @package App
class City extends Model
    use Searchable;

My config is PHP 7.2.31

Any idea ?

Thanks !

Hi there!

Could you please paste the full content of your package.json, and the content of the City model so we can see where Illuminate\Contracts\Bus\Dispatcher is used and thus help you to troubleshoot the issue.