Installed Laravel Scout according to the following instructions:
1) Execute the command composer require laravel/scout
2) Added extension to providers 'Laravel\Scout\ScoutServiceProvider::class,'
3) Run the php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider" command php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
4) Added extension in Model
Laravel\Scout\Searchable use Searchable; 5) composer require algolia/algoliasearch-client-php command composer require algolia/algoliasearch-client-php
6) The model now looks like this:
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Laravel\Scout\Searchable; use DB; class Product extends Model { use Searchable; protected $table = 'products'; public static function getProductsBySearch($search) { // Список найденных продуктов $searchProducts = Product::search('Test') ->get() ->all(); return $searchProducts; } } At the output, I get the error:
AlgoliaSearch requires an applicationID How to solve this problem? Thanks to all.