From the course: Extending Laravel with First Party Packages

Unlock this course with a free trial

Join today to access over 22,700 courses taught by industry experts.

Start indexing your models

Start indexing your models

- [Instructor] Alright guys so we have done all of the setup that we need to do, and it's time to start indexing our models and actually putting all of the information that's in our database into our index as well so we can start running searches. So that's what we'll be focusing on in this video. Alright so in this video we are going to make all of our models searchable. We're also going to run our initial index, so that all of the information that's already in the database will be put into our index. And then we will add some new records to the database and index those new records as they happen. So now let's jump over into our code and get this set up. Now before we can do, we can actually start indexing the models, we do need to bring in the algolia client for PHP, so we're going to run composer require algolia slash algolia search. Okay so this is what we wanna do, algolia search dash client dash PHP. Go ahead and click enter to bring in that package, and this will connect…

Contents