Laravel Scout for the PHP Search API

Features

  • Made to simplify the usage of Algolia’s API within the Laravel Framework
  • Built on top of the latest release of Laravel Scout, extending Scout’s search features
  • Zero downtime reimports, aggregators
  • Powers Laravel’s docs
  • Background retry strategy to ensure uptime
  • Seamless batching via iterators to optimize number of network calls
  • Zero downtime reindexing feature
  • API access to all Algolia functionality, AI products, and advanced features, including Recommend  

Version

  • Requires: PHP 7.3+, Laravel 6+

Related Integrations

  • PHP API Client, Autocomplete, InstantSearch

Key links


Get started

INSTALL

1composer require algolia/scout-extended

INDEX

1//intialize data
2namespace App;
3
4use Laravel\Scout\Searchable;
5use Illuminate\Database\Eloquent\Model;
6
7class Article extends Model
8{
9    use Searchable;
10}
11
12// update
13class ArticleController extends Controller
14{
15    public function update(Request $request, $id)
16    {
17        Article::find(request('id'));
18        $article->title = request('title');
19        $article->update();
20    }
21}

SEARCH

1Route::get('search', function() {
2    $query = 'jimmie'; // <-- Change the query for testing.
3
4    $articles = App\Article::search($query)->get();
5
6    return $articles;
7});
Get started for freeExplore all developer docs

Built with Algolia

Frontend Tools
Templates & Starters

Ecommerce Starter

Starter for product search powered by Algolia InstantSearch

  • vuejs
  • react
  • angular
  • javascript