Import a database table in algolia

I found this code on the algolia website, but it does not add any index to the algolia website. I am working fine with index search, which algolia provides "getstarted_actors" ". but I want to import my own database data to be created as an index. please help

The following code adds search capabilities to your contact model by creating a contact index:

    use Illuminate\Database\Eloquent\Model;
    use AlgoliaSearch\Laravel\AlgoliaEloquentTrait;

    class Contact extends Model 
    { use AlgoliaEloquentTrait;
     }
+4
source share
1 answer

Algolia, reindex, AlgoliaEloquentTrait . , autoindex , .

:

YourModel::reindex();
+7

Source: https://habr.com/ru/post/1651834/


All Articles