Download the PHP package devloopsnet/laravel-typesense without Composer
On this page you can find all versions of the php package devloopsnet/laravel-typesense. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devloopsnet/laravel-typesense
More information about devloopsnet/laravel-typesense
Files in devloopsnet/laravel-typesense
Package laravel-typesense
Short Description Typesense laravel/scout engine
License MIT
Homepage https://www.devloops.net
Informations about the package laravel-typesense
⚠️ This project has moved to the official Typesense Github org: https://github.com/typesense/laravel-scout-typesense-driver. It was adopted as the official Typesense PHP client on Dec 2021 and ongoing development will take place there.
Please upgrade to the `typesense/laravel-scout-typesense-driver` composer package to receive new updates.
The rest of this Readme file is kept as is for posterity.
[![Latest Version on Packagist](https://img.shields.io/packagist/v/devloopsnet/laravel-typesense.svg?style=for-the-badge)](https://packagist.org/packages/devloopsnet/laravel-typesense) ![Postcardware](https://img.shields.io/badge/Postcardware-%F0%9F%92%8C-197593?style=for-the-badge) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/98c6531ca2f141cc9c9de037a15b9c4c)](https://app.codacy.com/gh/devloopsnet/laravel-scout-typesense-engine?utm_source=github.com&utm_medium=referral&utm_content=devloopsnet/laravel-scout-typesense-engine&utm_campaign=Badge_Grade_Settings) [![PHP from Packagist](https://img.shields.io/packagist/php-v/devloopsnet/laravel-typesense?style=flat-square)](https://packagist.org/packages/devloopsnet/laravel-typesense) [![Total Downloads](https://img.shields.io/packagist/dt/devloopsnet/laravel-typesense.svg?style=flat-square)](https://packagist.org/packages/devloopsnet/laravel-typesense) [![StyleCI](https://github.styleci.io/repos/253329257/shield?branch=master)](https://github.styleci.io/repos/253329257?branch=master)
Laravel Scout Typesense Engine
Typesense engine for laravel/scout https://github.com/typesense/typesense .
This package makes it easy to add full text search support to your models with Laravel 7. to 8..
Contents
- Installation
- Usage
- Author
- License
Installation
You can install the package via composer:
Add the service provider:
Ensure you have Laravel Scout as a provider too otherwise you will get an "unresolvable dependency" error
Add SCOUT_DRIVER=typesense
to your .env
file
Then you should publish scout.php
configuration file to your config directory
In your config/scout.php
add:
Usage
After you have installed scout and the Typesense driver, you need to add the
Searchable
trait to your models that you want to make searchable. Additionaly, define the fields you want to make searchable by defining the toSearchableArray
method on the model and implement TypesenseSearch
:
Then, sync the data with the search service like:
php artisan scout:import App\\Post
After that you can search your models with:
Or
Then you can apply your where(s) to the builder as follows :
*Note : For geolocation search, make sure to send an empty operator as follows
Extended/Added methods to Scout Builder
Check Typesense Search for reference.
-
Group by
-
Order
-
Location Order
-
Group by limit
-
Highlight start tag
-
Highlight end tag
- Hits limit
Adding via Query
The searchable()
method will chunk the results of the query and add the records to your search index.
You may also add record via collection...
---- OR
You may also add records via collections...
Author
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-typesense with dependencies
laravel/scout Version ^8.0|^9.0
illuminate/bus Version ^7.0|^8.0
illuminate/contracts Version ^7.0|^8.0
illuminate/database Version ^7.0|^8.0
illuminate/pagination Version ^7.0|^8.0
illuminate/queue Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0
typesense/typesense-php Version ^4.0