0

I am just starting to use Laravel Scout and Angolia driver. I had a problem with importing the model. At first, I import the App\Agency and it was imported. But when I try to import the rest of my model, it produces an error Call to undefined method Illuminate\Database\Query\Builder::makeAllSearchable()

1st import

 php artisan scout:import "App\Agency"
 Imported [App\Agency] models up to ID: 3
 All [App\Agency] records have been imported.

and another import

php artisan scout:import "App\Bag"
[BadMethodCallException]
Call to undefined method Illuminate\Database\Query\Builder::makeAllSearchable()

I put the use Searchable; in the model.

boldsinas101
  • 300
  • 2
  • 5
  • 22

1 Answers1

0

Okay, I got the solution. I need to declare Laravel\Scout\Searchable and add use Searchable in every model

boldsinas101
  • 300
  • 2
  • 5
  • 22