Download the PHP package dbmind/laravel-sql without Composer

On this page you can find all versions of the php package dbmind/laravel-sql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sql

PHP 8.3+ Laravel 11, 12, 13 MIT license

Ask your database questions in plain language — it answers with one guarded, read-only SELECT.
The SQL-only edition: no Qdrant, no embeddings, no indexing. The AI writes the query, SqlGuard vets it, and the answer is grounded in your real rows.

Quickstart · How it works · Cloud vs local · Commands · Usage · Security · Architecture


Why the SQL-only edition?

Install the package, paste an API key, and ask your database questions in plain language. For every question an AI model writes a single read-only SELECT (it may JOIN your approved tables), the query is validated by SqlGuard, run on a read-only connection with a statement timeout, and the real result rows are handed back to the model to phrase a grounded answer.

There is no Qdrant, no embeddings, no vector retrieval — and no per-table configuration: during install you only choose which tables the AI must NOT answer from. Everything else is approved and auto-configured from the schema (column types, foreign keys, indexes).

It also adds a clarifying-question loop: when a question is genuinely ambiguous the model asks short questions, the CLI collects the answers, and it re-asks with them in context.

⚡ Quickstart

Cloud mode needs nothing but an API key from your DBMind dashboard. Local mode needs Ollama with a SQL-capable chat model:

Then run the wizard:

[!NOTE] The install wizard asks "Which tables should the AI NOT answer from?" — framework tables (migrations, jobs, sessions, …) are pre-selected. Every other table is approved and auto-configured: primary key, readable/filterable/numeric columns, foreign-key join paths and indexed columns are inferred from the schema. Fine-tune by editing storage/app/dbmind1/catalog.json anytime.

🧭 How it works

  1. Write the SQL — the model sees a sanitised schema (approved tables, real foreign keys, indexed columns) and writes exactly one SELECT, JOINing along the foreign keys it was given.
  2. Guard & executeSqlGuard rejects anything that isn't a single read-only SELECT on approved tables with no denied columns and an enforced LIMIT. The query runs on a read-only connection under a database-side statement timeout; failures feed a bounded repair loop.
  3. Answer from real rows — the result rows (capped and sanitised) go back to the model, which phrases a grounded answer. --show-sql prints the exact query so every answer is auditable.

Two ways to run it

cloud (recommended) local
Setup paste the API key from your DBMind dashboard run Ollama + pull a model
Who reasons frontier models via the hosted DBMind gateway (/v1/sql/*, OpenRouter-backed) your own Ollama server
What leaves the server question + schema metadata + the query's result rows (capped + sanitised, private text values AES-256-GCM-encrypted) nothing
Who touches your DB only your server — SQL is guarded and executed locally in both modes same
Billing / quotas metered per token on your DBMind plan free

In both modes every generated query passes the local SqlGuard and runs on your local read-only connection. The cloud never connects to your database.

In cloud mode, value encryption is on by default: names, emails, phone numbers and other text values are sealed into opaque [[DBM1:…]] tokens before the rows leave your server. The model copies the tokens verbatim into its answer and the package decrypts them locally — the key never leaves your server. Numbers stay readable so rankings and totals work. Full walkthrough: docs/cloud-request-simulation.md.

On top of that, dbmind1:install lets you mark whole tables or single columns as always-encrypted — for data that is too sensitive even for the default rules (salaries, ledgers, medical records). Values from those selections are sent as tokens numbers and dates included. The choice is stored per source in the catalog (encrypt_all / encrypt) and is hand-editable anytime.

How it differs from dbmind/laravel

dbmind/laravel dbmind/laravel-sql (this)
Namespace DBMind\ DBMind1\
Config / commands dbmind, dbmind:* dbmind1, dbmind1:*
Answering vector RAG + plan engine + raw SQL raw SQL only
Joins across tables ✗ (plan engine) ✓ (follows real foreign keys)
Clarifying questions ✓ (interactive)
Qdrant / embeddings required none
Table approval per-table wizard exclusion list ("don't answer from X")

Both packages use different namespaces, config keys, and command prefixes, so they can be installed side by side.

🛠 Commands

Command Purpose
dbmind1:install Interactive setup: provider + table exclusions + auto-config
dbmind1:doctor Health check: DB read access + the AI gateway
dbmind1:discover Read-only listing of connections, tables, columns
dbmind1:sync [--dry-run] After migrations: auto-approve new tables, refresh metadata
dbmind1:test "question" Ask from the CLI

dbmind1:test flags

💻 Programmatic use

🛡 Security

[!IMPORTANT] This edition is not tenant-scoped (raw SQL can't be safely tenant-filtered). For multi-tenant isolation use the full dbmind/laravel plan engine.

⚙️ Configuration

Publish with php artisan vendor:publish --tag=dbmind1-config. Key env vars:

🏛 Architecture

Application depends only on Domain contracts; Infrastructure implements those contracts; Laravel/DBMind1ServiceProvider is the composition root that wires them together. Data crosses boundaries as final readonly DTOs — never arrays or Eloquent models.

🧪 Testing

📄 License

MIT — see LICENSE.


All versions of laravel-sql with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dbmind/laravel-sql contains the following files

Loading the files please wait ...