Download the PHP package mamun724682/laravel-db-governor without Composer

On this page you can find all versions of the php package mamun724682/laravel-db-governor. 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-db-governor

Laravel DB Governor

Latest Version on Packagist Total Downloads GitHub Stars PHP Laravel Tests

A production-safety database governance layer for Laravel teams. Intercept, review, approve, execute, and roll back SQL queries through a secure web UI — with full audit trails, risk scoring, and row-level snapshots.


Why DB Governor?

Running raw UPDATE or DELETE queries directly on a production database is dangerous. One wrong WHERE clause (or no clause at all) can silently wipe data. DB Governor forces every write query through a structured approval workflow before it ever touches your database.


Features

🔐 Role-Based Access

Two roles configured entirely via environment variables — no extra tables required.

Role Capabilities
Admin Approve / Reject / Execute / Rollback, view all queries from all users
Employee Submit queries, view own submissions; SELECTs execute immediately

Token-based sessions (stored in cache) with configurable expiry (DB_GOVERNOR_TOKEN_EXPIRY). Role is re-derived on every request so promotions/demotions take effect without re-login.


📋 Query Approval Workflow

Every query record stores:


⚠️ Automatic Risk Scoring

Every submitted query is analysed before it enters the queue:

Risk Level Trigger
critical Matches a blocked pattern (e.g. DROP TABLE, TRUNCATE) — query is blocked outright
high Matches a flagged pattern (e.g. UPDATE … SET without WHERE) or estimated rows exceed max_affected_rows
medium / low Everything else

Blocked/flagged patterns are fully customisable regex arrays in the config. A dry-run engine estimates affected row counts before submission.


↩️ Row-Level Rollback

Before executing any UPDATE or DELETE, DB Governor captures a before-state snapshot of every affected row. If something goes wrong after execution, a one-click Rollback:

Snapshots are stored as JSON in the audit record. Configurable via snapshot_max_rows (default: 500 rows).


🖥️ SQL Console

A full in-browser SQL console with two modes:

Query Builder (visual, no SQL knowledge needed)

Raw SQL — free-form textarea with:

Value inputs adapt to column type automatically:


📊 Table Browser

Browse any table directly in the UI:


🗂️ Sidebar Navigation


🔍 Query Log


⚡ Schema Cache

Table list and column metadata are cached (default: 5 minutes) to avoid repeated introspection queries. Configurable via DB_GOVERNOR_SCHEMA_CACHE_TTL.


🔌 Multi-Connection Support

Map multiple Laravel database connections to named URL slugs:

Switch between connections from the UI. Each connection has its own table browser, query log, and SQL console.


🛡️ Hidden Tables

Framework-internal tables (migrations, cache, sessions, jobs, telescope_*, etc.) are hidden from the UI by default and blocked from query execution.


Requirements

Requirement Version
PHP ^8.1
Laravel ^10 \| ^11 \| ^12 \| ^13
Database MySQL, PostgreSQL, SQLite

Installation

Publish the config and run migrations:

Optionally publish views to customise the UI:


Configuration

Add to your .env:

Full config reference at config/db-governor.php after publishing.


Usage

Navigate to http://your-app.test/db-governor and log in with an admin or employee email.

Workflow example


Customising Risk Patterns


Multiple Connections

Each connection gets its own URL: /db-governor/prod, /db-governor/staging, etc.


Security


Development


Contributing

Pull requests are welcome. Please open an issue first to discuss significant changes.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Write tests for your changes
  4. Ensure composer test and composer lint both pass
  5. Submit a pull request

Support

If DB Governor helps your team, please star the repository.


License

The MIT License (MIT). See LICENSE for details.


All versions of laravel-db-governor with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/database Version ^10|^11|^12|^13
illuminate/http Version ^10|^11|^12|^13
illuminate/pagination Version ^10|^11|^12|^13
illuminate/support Version ^10|^11|^12|^13
illuminate/view Version ^10|^11|^12|^13
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 mamun724682/laravel-db-governor contains the following files

Loading the files please wait ...