Rudy-L
1 month ago
142
5
Laravel

Scout without angolia

Posted 1 month ago by Rudy-L

Can someyone me explain the code i need, because i have always a emplty array as result.

i have make next staps:

=> composer require laravel/scout

=> php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"

=> Model: use Laravel\Scout\Searchable;

use Searchable;

=> Config/scout: 'driver' => env('SCOUT_DRIVER', 'null'),

What about this functions? do i need this?

=> public function searchableAs() { return 'posts_index'; }

=> public function toSearchableArray() { $array = $this->toArray();

    Customize array...return $array; 
}

Please sign in or create an account to participate in this conversation.