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
Requires: PHP 7.3+, Laravel 6+
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;
});