Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Adminer Laravel Bridge Laravel Package

magnusvin/adminer-laravel-bridge

Magnusvin's Adminer Laravel Bridge embeds the Adminer database manager inside Laravel apps, providing a lightweight browser-based UI for inspecting and managing MySQL, PostgreSQL, SQLite, and other connections with minimal configuration and no heavy admin tooling.

View on GitHub
Deep Wiki
Context7

Getting Started

The bridge is intentionally small: install magnusvin/adminer-laravel-bridge with Composer, publish the package config/assets if your setup does not auto-publish them, and mount Adminer behind a Laravel route protected by middleware. Look first at the published config/adminer.php (or the package config in vendor/) and the package README for the exact route name, middleware hook, and asset-publishing tag. Confirm which Laravel DB connection Adminer should target, then visit the route and log in with database credentials—not Laravel user credentials.

The first practical use case is an internal database browser for local/staging: expose Adminer at a non-public route, wrap it in auth plus an authorization gate or IP allowlist, and use it to inspect schema, run SQL, and edit rows without shipping a separate Adminer install. For production, only enable it deliberately and behind stronger controls.

The 6.2.0.0 release does not change bridge code. It advances the pinned vrana/adminer package to Adminer 6.2.0, so treat it as an upstream Adminer upgrade with the same bridge wiring, routing, and asset-serving behavior.

Implementation Patterns

  • Gate the route, not just the URL. Put Adminer behind Laravel auth, a policy/gate, IP restriction, or a local-only middleware group. Adminer itself authenticates against the database, so Laravel middleware is the access-control layer for the tool.
  • Use a dedicated route group. Keep Adminer out of public route files or wrap it with middleware such as auth, verified, can:viewAdminer, and environment checks. If the bridge exposes route registration through config, set the middleware there rather than editing vendor routes.
  • Map connections deliberately. Decide whether Adminer should log in with the same credentials as the Laravel app or a separate read-only/limited DB user. For day-to-day debugging, a restricted DB user is usually safer; for local schema work, the normal local credentials are fine.
  • Publish assets when customizing. If you need to change Adminer CSS/JS or serve assets from your own public path, use the package’s asset-publishing flow and clear Laravel caches after changes. Keep the bridge’s asset smoke test in mind: it verifies wiring and serving, not Adminer’s full UI.
  • Configure plugins through the bridge config. Adminer 6.2.0 adds upstream Plugin::$optional and Plugin::disable() support. If the bridge config accepts Adminer plugin class names, use these to make plugins env-switchable and disabled by default rather than hard-coding them for every environment.
  • Use driver metadata for custom Adminer integrations. If you maintain custom Adminer drivers or field definitions, Adminer 6.2.0 adds a doc field key for linking column documentation and default_sql for marking defaults as SQL expressions. Use Driver::errorLine() / the SQL textarea’s data-error-line attribute if you build syntax-highlighting or error-marking integrations.
  • Smoke-test after upgrade. Add a simple HTTP test that the Adminer route responds and assets load. Do not assume the bridge’s test matrix exercises Adminer’s database-backed UI; manually check login, schema browsing, and SQL execution for the databases you actually use.
  • Keep a local/staging-first workflow. Use the bridge for quick schema inspection, row edits, and SQL debugging during development, then rely on migrations/seeders for repeatable changes. Adminer edits are useful for investigation but should not become the source of truth for production schema changes.

Gotchas and Tips

  • Never expose Adminer unauthenticated. It is a full database client. A leaked route with valid DB credentials is equivalent to handing out direct database access. Use middleware, gates, IP allowlists, and environment checks.
  • Laravel login is not Adminer login. The bridge gates access to the Adminer page; Adminer still asks for a database driver, server, username, password, and database. Document which credentials are expected so developers do not try their Laravel app login.
  • The bridge release tests do not cover Adminer’s UI. The 6.2.0.0 notes explicitly say the test matrix covers wiring, routing, and asset serving, not Adminer behind a live database connection. If you depend on specific Adminer flows, verify them after upgrading.
  • Read the upstream changelog for behavior changes. Adminer 6.2.0 includes many database-specific fixes: PostgreSQL PDO export/table counts, SQLite table recreation and comments, MySQL ON UPDATE CURRENT_TIMESTAMP precision, SQL Server index changes, Oracle timestamp defaults, and Firebird PDO support. These are upstream fixes, but they can change what you see in the UI.
  • Plugin API changes are upstream, not bridge-specific. Plugin::$optional, Plugin::disable(), doc, default_sql, and errorLine() come from Adminer 6.2.0. If the bridge config passes plugins through, they are usable; do not assume the bridge added new configuration UI for them.
  • Clear config and route caches after changes. Laravel config caching and route caching can hide updates to middleware, route prefixes, or plugin settings. Run the usual cache-clearing commands after publishing config or changing environment values.
  • Watch asset caching and CSP. Adminer’s CSS/JS may be served through the bridge or published assets. If you use a strict Content Security Policy or CDN, confirm the Adminer assets and inline scripts are allowed; otherwise the UI may load blank or partially styled.
  • Database-specific environment issues still apply. SQLite file permissions, PostgreSQL search_path and extension types, and restricted DB users can all break Adminer features even when the bridge is configured correctly. Test with the same connection details developers will use.
  • Upgrading is low-risk at the bridge layer, but not zero-risk in the UI. Because 6.2.0.0 only moves the vrana/adminer pin, there should be no bridge API changes. Still, custom plugins, custom drivers, or database-specific workflows should be checked against Adminer 6.2.0 before rolling out broadly.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource