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

Nova Mysql Laravel Package

naif/nova-mysql

A Laravel Nova integration for MySQL that lets you inspect and manage your database from the admin panel. Browse tables, run queries, and handle routine database tasks without leaving Nova, keeping your workflow in one place.

View on GitHub
Deep Wiki
Context7

Getting Started

Install via Composer:

composer require naif/nova-mysql

Register the tool in app/Providers/NovaServiceProvider.php inside tools():

public function tools()
{
    return [
        new \Naif\MysqlServerManagement\MysqlServerManagement(),
    ];
}

Then run php artisan vendor:publish (check the package README or src/ for the exact provider/class name — small packages often change namespaces between releases), and, if the tool ships uncompiled assets, run its build (npm install && npm run dev in the tool's vendor folder or a copied nova-components/ directory). php artisan nova:publish if Nova's own assets need refreshing.

Look first at:

  1. vendor/naif/nova-mysql/composer.json — the Nova version constraint. The last release is 2018-11-09, so it almost certainly targets Nova 1.x.
  2. src/ — confirm the tool class name and whether there's a config file.
  3. routes/api.php — the routes the tool registers under /nova-vendor/....

First use case: server-side inspection from the admin UI. After a deploy, open the tool to check that a migration touched the right tables, confirm a seeded row landed, or run a one-off SELECT — without opening a MySQL client or SSH tunnel. It is a convenience layer over the Nova admin surface, not a general query workbench.

Before investing time, confirm Nova compatibility. If you're on Nova 4/5, expect the tool to fail to boot or render blank.

Implementation Patterns

Register conditionally, not universally. Keep the tool out of production by default — it exposes raw database surface inside your admin panel:

public function tools()
{
    return $this->app->environment(['local', 'staging'])
        ? [new MysqlServerManagement()]
        : [];
}

Guard with a gate, not just Nova's login. Every person who can reach /nova should not be able to poke the database. Define a viewMysqlServerManagement gate in AuthServiceProvider and have the tool's menu entry respect it (or override authorize() if the tool extends Nova's Tool).

Constrain by DB user. You cannot rely on the package to enforce read-only. For production/staging use a dedicated MySQL account with SELECT-only grants, and point the tool at that connection. This is the only reliable guardrail against accidental writes from an old, lightly-maintained UI.

Multi-connection apps. If your config/database.php defines several connections (tenant DB, reporting replica, legacy DB), check whether the tool hardcodes database.connections.mysql or exposes a picker. If hardcoded, fork and add a config array of allowed connections rather than patching vendor files on every deploy.

Complement, don't replace, Nova resources. For repeatable inspections ("show me recent orders") build a Nova Resource or Lens. Reserve this tool for ad-hoc inspection. Don't write runbooks that depend on it.

Fork-into-nova-components/ as the upgrade path. On any Nova major bump, replace the vendor dependency with php artisan nova:tool mysql-server-management and copy the package's Vue + controller logic in. You'll own the code, but you'll also be able to fix it when Nova's tool API moves.

Gotchas and Tips

  • Abandonment risk is the dominant concern. 17 stars, 0 dependents, last release 2018-11-09. Treat it as an unmaintained demo, not a supported dependency. Budget for a fork the moment a Laravel/Nova/PHP upgrade breaks it.
  • Version constraint mismatch. composer require will likely fail or pull an old Nova. Read composer.json in the repo first — you may need to composer require with --ignore-platform-reqs or manually clone.
  • Namespace drift. Small packages frequently rename classes between tags. After install, ls vendor/naif/nova-mysql/src and use the actual class name in tools(). The README is a starting hint, not documentation.
  • Asset tooling rot. 2018-era Nova tools built with Laravel Mix 1.x against Vue 2.5. Modern Node (18+) will fail on node-sass etc. Use the prebuilt dist/js bundle if possible; otherwise rebuild with sass (dart-sass) and vue-loader v15.
  • Silent failures. Nova tool errors rarely surface in the UI. Check the browser console for Vue component errors and storage/logs/laravel.log for 404s on /nova-vendor/... routes — that usually means the tool's provider wasn't loaded or its route file is stale.
  • Config publishing may not work. If vendor:publish --provider=... returns nothing, the provider likely doesn't define a publish tag; check src/Providers/ for publishes() and add your own config file reading config('nova-mysql.*') if you need overrides.
  • Route/middleware collisions after a Nova upgrade. Tools register their own route group. Crossing Nova majors can leave you with 404s or a middleware mismatch (auth vs. Nova's Authorize). Inspect the package's routes/api.php and re-register under Nova's expected prefix.
  • Security review before any non-local deploy. Read the controller that runs queries: confirm parameter binding (not string concatenation), correct charset on the connection, and no query strings dumped into a shared log file. Raw-SQL tools are a frequent source of injection findings because developers forget the input is already trusted-ish admin traffic.
  • No extension points. Expect no events, no middleware hooks, no swappable query layer. If you need custom behavior, own the fork rather than subclassing a 2018 artifact.
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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums