PHPackages                             venmail/laravel-semantic-search - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. venmail/laravel-semantic-search

ActiveLibrary[Database &amp; ORM](/categories/database)

venmail/laravel-semantic-search
===============================

Laravel semantic search package with static code analysis and context-aware query building.

0.3.0(2mo ago)1287↓61%MITPHPPHP ^8.1CI failing

Since Jan 5Pushed 2mo agoCompare

[ Source](https://github.com/VenMail/semantic-search)[ Packagist](https://packagist.org/packages/venmail/laravel-semantic-search)[ RSS](/packages/venmail-laravel-semantic-search/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (9)Versions (7)Used By (0)

Laravel Semantic Search
=======================

[](#laravel-semantic-search)

[![Latest Version](https://camo.githubusercontent.com/2e27a051731e2ba6e0141be1b50ec5a8ca485cc8aa5c3a2d54a5b1ce03b5c4ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76656e6d61696c2f6c61726176656c2d73656d616e7469632d7365617263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/venmail/laravel-semantic-search)[![Total Downloads](https://camo.githubusercontent.com/286a269754683bf361cc9b7bcb15094c620e9799fc3a64eaa80b78d7b720b616/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76656e6d61696c2f6c61726176656c2d73656d616e7469632d7365617263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/venmail/laravel-semantic-search)[![License](https://camo.githubusercontent.com/be2dc24dc691472178c42acf2b1cb736e5595417d6e810cf14f00dfa25558112/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f76656e6d61696c2f6c61726176656c2d73656d616e7469632d7365617263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/venmail/laravel-semantic-search)

A powerful, production-ready semantic search package for Laravel that enables natural language querying across your Eloquent models with intelligent English-to-SQL translation. No embeddings, no ML training—just instant, accurate search powered by static code analysis.

✨ Features
----------

[](#-features)

- 🎯 **Natural Language Queries** - Query your models using plain English
- 🧠 **Intelligent Code Analysis** - Automatically analyzes your Laravel project structure
- 🌍 **Multilingual Support** - English, Spanish, French, German, Portuguese
- 🔍 **Context-Aware Search** - Understands business logic, relationships, and UI patterns
- 🔗 **Relationship Intelligence** - Navigates Eloquent relationships automatically
- 🚀 **Zero Training Required** - Works instantly with your existing codebase
- 💾 **Multi-Database Support** - MySQL, PostgreSQL, SQLite
- 🤖 **LLM Fallback** - Optional OpenAI integration for complex queries
- 🔒 **Security First** - Built-in authorization and access control
- ⚡ **Performance Optimized** - Intelligent caching and query optimization
- 📊 **Aggregation Support** - Count, sum, average, min, max with grouping
- 🔀 **Boolean Logic** - AND/OR operators in filters

📋 Requirements
--------------

[](#-requirements)

- PHP 8.1 or higher
- Laravel 9.x, 10.x, or 11.x
- MySQL 8.0+, PostgreSQL 12+, or SQLite 3.0+
- Composer

📦 Installation
--------------

[](#-installation)

### Install via Composer

[](#install-via-composer)

```
composer require venmail/laravel-semantic-search
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --tag="semantic-search-config"
```

This will create `config/semantic-search.php` in your Laravel application.

🚀 Quick Start
-------------

[](#-quick-start)

### Basic Usage

[](#basic-usage)

```
use Venmail\SemanticSearch\Facades\SemanticSearch;

// Simple queries
$results = SemanticSearch::search("active users older than 25");
$results = SemanticSearch::search("users with posts created last month");

// With pagination
$results = SemanticSearch::search("high-value transactions")
    ->paginate(20);

// Aggregation queries
$results = SemanticSearch::search("count users by country");
$results = SemanticSearch::search("sum of transactions by category");
```

### Example Controller

[](#example-controller)

```
