Get started

INSTALL (GET A FREE ACCOUNT HERE.)


        
          
            

composer require algolia/scout-extended

INDEX


        
          
            

//intialize data
namespace App;

use Laravel\Scout\Searchable;
use Illuminate\Database\Eloquent\Model;

class Article extends Model
{
    use Searchable;
}

// update
class ArticleController extends Controller
{
    public function update(Request $request, $id)
    {
        Article::find(request('id'));
        $article->title = request('title');
        $article->update();
    }
}

SEARCH


        
          
            

Route::get('search', function() {
    $query = 'jimmie'; // <-- Change the query for testing.

    $articles = App\Article::search($query)->get();

    return $articles;
});

Enable anyone to build great Search & Discovery