Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
How to Build a Lyrics Website with Laravel Scout and Algolia
Jul 06, 2017 @ 17:06:11

On the SitePoint PHP blog they've posted a new tutorial showing you how to create a lyrics website with the combination of Laravel Scout and the Algolia data search service.

In this tutorial, we will create a minimal lyrics web site using Laravel Scout and Algolia. To do so, we need a CRUD app to work with our data, and a search interface to let users search through the content. However, instead of creating the full app from scratch, let’s just install the finished CRUD app that we’ve created for this tutorial.

Algolia is a hosted search engine API, providing us with all the tools and resources we’ll ever need to create products with awesome search capabilities.

The end result is a site with a simple search box that displays the matching album/songs for the search string provided. They start in on the code by bootstrapping the project and setting up the database (including loading it with the included SQL file). Next they install the Laravel Scout package and update the "Song" model to be searchable. The tutorial then walks you through the creation of a Algolia account, indexing the current data and importing it into Algolia. Finally it circles back around to the site and helps you create the pieces (controller/view/etc) to make the frontend search work with the Algolia API for searching the indexed data.

tagged: tutorial algolia search laravel scout lyrics integration api

Link: https://www.sitepoint.com/build-lyrics-website-laravel-scout-algolia/

Laravel News:
Learn how to use the TNTSearch driver with Laravel Scout
Oct 19, 2016 @ 16:52:50

On the Laravel News site there's a new tutorial posted showing you how to hook in the TNTSearch package with the Laravel Scout functionality replacing the default Algolia driver.

Laravel Scout provides a simple, driver-based solution for adding full-text search to your Eloquent models.

Out of the box, Laravel 5.3 ships with Algolia driver. However, we can easily write custom drivers; that’s exactly what TeamTnt has done by providing a TNTSearch driver for Laravel Scout.

The tutorial then walks you through getting the TNTSearch driver installed and integrated into your Laravel application (via Composer). They they show it in use on a sample database of film information and creating the related models. They show how to add in the "Searchable" trait for Scout, indexing the data and using the "search" method to locate matching results.

tagged: tntsearch driver scout laravel tutorial search

Link: https://laravel-news.com/2016/10/tntsearch-with-laravel-scout/

Laravel News:
Laravel Scout is now open for developer testing
Aug 16, 2016 @ 15:37:38

The Laravel News site has a new post with an update for those looking forward to trying out Laravel "Scout", the search handling to be released along side the next Laravel framework release. The post announces that Laravel Scout is now open for developer testing directly from the live repository.

Laravel Scout is a driver based full-text search for Eloquent that is going to be available when Laravel 5.3 launches.

The driver is not officially released yet, however, the repository is now live and available for those that want to play with more engines. Taylor said he would be working on docs this week in anticipation of the official 5.3 release and this first release should only be used in testing until it’s officially launched.

If you're interested in more details about Scout, check out this post from Matt Stauffer with details and code examples.

tagged: laravel scout developer testing search functionality

Link: https://laravel-news.com/2016/08/laravel-scout-is-now-open-for-developer-testing/

Matt Stauffer:
Introducing Laravel Scout
Aug 03, 2016 @ 16:18:23

In his contuning series looking at the features coming in the next release of the Laravel framework (v5.3) Matt Stauffer takes a closer look at Laravel Scout, a new package that makes integration of content searching simpler for Laravel applications.

Search tools ElasticSearch and Algolia have gained a lot of popularity in the Laravel community in the last few years as powerful tools for indexing and searching your data.

[...] If you take a look at my pull request or theirs [to add Algolia support for Laravel], you'll see that it's not a small task to integrate fulltext search into your site. Algolia has since released a free product called Algolia DocSearch that makes it easy to add an Algolia search widget to documentation pages. But for anything else, you're still stuck writing the integration yourself—that is, until now.

He then goes about introducing what Laravel Scout is and how it integrates directly with Eloquent to make it easier to search and index their contents. It's a separate package that needs to be pulled in via Composer, but then it's simple to integrate. He includes examples of querying the data, setting the queries to queue and a few special cases to watch out for in your own Scout use.

tagged: laravel scout searching algolia fulltext package eloquent model

Link: https://mattstauffer.co/blog/introducing-laravel-scout


Trending Topics: