Posts tagged with search

Join 9,500+ smart developers

Every month I share what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

A Laravel package to crawl and index content of your sites original

by Freek Van der Herten – 12 minute read

The newly released spatie/laravel-site-search package can crawl and index the content of one or more sites. You can think of it as a private Google search for your sites. Like most Spatie packages, it is highly customizable: you have total control over what content gets crawled and indexed.

To see the package in action, head over to the search page of this very blog.

In this post, I'd like to introduce the package to you and highlight some implementation and testing details. Let's dig in!

Read more

How to integrate Elasticsearch in your Laravel App

madewithlove.be

Tony Messias wrote a good post on the Madewithlove blog on how to get started using Elastichsearch in a Laravel app.

One of the most popular ways is using Elasticsearch. It is a very powerful tool and it comes with a variety of useful features and complementary tools. We are going to cover the basics here and leave you with some links for more resources if you want to dig further.

Read more [madewithlove.be]

Searching models using a where like query in Laravel original

by Freek Van der Herten – 5 minute read

For a project I'm working on I needed to build a lightweight, pragmatic search. In this blogpost I'd like to go over my solution. Searching Eloquent models Imagine you need to provide a search for users. Using Eloquent you can perform a search like this: User::query() ->where('name',…

Read more

Achieving Geo-search with Laravel Scout and Algolia

On Scotch.io a new post by Julien Bourdeau was published that shows how you can easily import and search geographic data with Laravel Scout and Algolia.

Laravel Scout makes it very easy to setup an external search engine to create consumer-grade search quickly. The package comes with Algolia as a default search engine. I'd like to demonstrate how to make use of the geo-location search feature with Scout.

In this tutorial, you'll learn how to prepare your data for Algolia and Laravel Scout to retrieve items based on location.

https://scotch.io/tutorials/achieving-geo-search-with-laravel-scout-and-algolia

Read more

How to use PHP Solarium in a Laravel project

Apache Solr is a high performance search engine much like Elastic. On his blog Peter Steenbergen explains how you can use Solr in a Laravel app.

This is my second blog in a series about SOLR with the PHP Solarium library. My first blog was about the usage of OR filters to create Multi-Select facets with SOLR. With this blog item I will show you how easy it is to implement the PHP Solarium library in the Laravel framework.

http://petericebear.github.io/laravel-php-solarium-integration-20160725/

Read more

Writing advanced Eloquent search query filters

Over at the excellent dotdev.co Amo Chohan wrote an article on how to structure code when you need many filters on an Eloquent model.

I recently needed to implement a search feature in an events management project I was building. What begun as a few simple options (searching by name, e-mail etc), turned into a pretty large set of parameters. Today, I’ll go over the process I went through and how I built a flexible and scalable search system. For those of you who are eager to see the final code, head over to the Git repository to see the code.

https://dotdev.co/writing-advanced-eloquent-search-query-filters-de8b6c2598db

Read more

Learning Elasticsearch with Laravel

Michael Stivala, the Maltese Artisan, wrote a nice introduction to Elasticsearch and how you can use it in Laravel.

In this post we’ll explore Elasticsearch; the basics of search and how to set it up with Laravel, Homestead and even Forge. Even though there are resources out there, I couldn’t find the one article that summarised everything I needed to get up and running in as short a time as possible.

https://michaelstivala.com/learning-elasticsearch-with-laravel

Read more

Integrating Algolia in a Laravel application original

by Freek Van der Herten – 6 minute read

A few days ago Spatie, the company where I work, launched a new website: vrijwilligerswerk.be. Translated to english it roughly comes down to workforvolunteers.be. On the website various organizations can post their jobs that can be filled by a volunteer. Volunteers have a very user-friendly way to…

Read more

Using Algolia in Laravel original

by Freek Van der Herten – 2 minute read

Algolia is a hosted service that makes advanced searching very easy. It's well documented and lightning quick. You can see some impressive examples on their site. Artisans probably know that Jeffrey Way recently published a series on Algolia. Earlier this year I made a package to easily work with a…

Read more