Download the PHP package liquiddesign/liquid-monitor-connector-laravel without Composer

On this page you can find all versions of the php package liquiddesign/liquid-monitor-connector-laravel. 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 liquid-monitor-connector-laravel

Liquid Monitor connector for Laravel

Laravel counterpart to liquid-monitor-connector (the Nette connector). Implements the same HTTP contract against the Liquid Monitor backend — cron/job lifecycle, error reporting, a read-only DB query proxy and a log-viewer proxy — so the backend needs no changes to support Laravel-hosted projects.

Installation

Set the base config in .env:

LIQUID_MONITOR_URL is the monitor's base API URL — without a /connector or /front suffix, those are appended per endpoint. The cron and log channels can point at a different monitor instance via LIQUID_MONITOR_CRON_URL/LIQUID_MONITOR_CRON_API_KEY and LIQUID_MONITOR_LOG_URL/LIQUID_MONITOR_LOG_API_KEY; unset, they fall back to the top-level URL/key.

Cron / job lifecycle

Register a cron in a service provider's boot():

Point your own scheduler (or a real system cron entry) and the monitor at the same URL — {LIQUID_MONITOR_CRON_ROUTE_PREFIX}/{code} (default liquid-monitor/cron/{code}):

The route serves two roles depending on the request body, mirroring the Nette connector's Cron::scheduleOrStartJob():

This keeps repeatCount retries, canRunConcurrently/canRunConcurrentlyCron, the monitor's queue-size limit and the "Run now" admin button working exactly as they do for Nette projects — no monitor-side changes needed.

Securing the webhook route: unlike Nette, this route has no framework-level auth by default (same as the Nette connector's presenter action). Anyone who knows the URL can trigger schedule-job, and the monitor is the only party expected to know the jobId for a "start" call. Put it behind your own IP allowlist/reverse-proxy rule if the app is publicly reachable.

Error reporting

A liquid_monitor log channel is auto-registered (no config/logging.php edit needed). Log through it directly:

Or wire it into the exception handler for automatic reporting of uncaught exceptions (bootstrap/app.php):

Use LiquidMonitorConnector\Exceptions\WeakException for low-importance errors that should still be logged on the monitor but not trigger a Slack alert.

Read-only DB query proxy

Disabled by default. Enable and set a token:

Exposes POST {route_prefix}/query (default liquid-monitor/db-query/api/query), matching the Nette connector's DbQueryApiPresenter contract exactly: the caller (the monitor) supplies both the SQL and the DB connection credentials in the request body. A 1:1 port of the same guard enforces SELECT/WITH-only, blocks multiple statements and DML/DDL keywords, wraps the query in a capped LIMIT subquery, and applies a driver-level statement timeout. MySQL/MariaDB and PostgreSQL are supported.

Log viewer proxy

Disabled by default. Enable and set a token:

Exposes list / stat / view / search / download under {route_prefix} (default liquid-monitor/log-viewer/api) over storage/logs by default (LIQUID_MONITOR_LOG_VIEWER_DIR to change it). This is a 1:1 port of liquiddesign/nette-log-viewer's LogViewerApiPresenter/LogReader — identical endpoints, query params, response shapes and error codes/messages — so that package's log-viewer-api skill (used by an AI agent to browse logs over HTTP) works unmodified against a Laravel-hosted connector too.

Security model difference from the Nette connector

The Nette connector gates both proxies via Tracy's per-request debug mode: an IP allowlist that makes Debugger::$productionMode resolve to false only for the monitor's own IP, while everyone else sees a normal production app. Laravel's APP_DEBUG is a single, static, global flag — it can't reproduce that per-request trick without exposing debug mode to every visitor.

Instead, AuthorizeMonitorRequest middleware enforces, fail-closed:

  1. An optional IP allowlist (LIQUID_MONITOR_{DB_QUERY,LOG_VIEWER}_ALLOWED_IPS, comma-separated).
  2. A mandatory X-Api-Key header, compared with hash_equals().

Both proxies are disabled by default; enabling one without a token is not possible — the middleware always requires one. This is a deliberate, documented hardening over the Nette side's optional token, not an accidental behavior difference.

Version handshake

Every outbound request carries X-Connector-Version (see LiquidMonitorConnector\Support\Version::CURRENT, currently 2.0.1 to match the backend's supported_versions at the time this package was created). If the backend reports the version as unsupported (426 Upgrade Required, or the legacy X-Connector-Version-Status: unsupported header), a warning is logged via the default Laravel logger so an outdated connector install is visible in the app's own logs. Bump Version::CURRENT whenever the connector→backend contract changes; see the backend's connector-versioning skill before introducing a new major.

Deploy hooks

LiquidMonitorConnector\Deploy\DeployClient wraps /api/connector/deploy/{is-deploy,start-deploy,deploy-done} for wiring into a deploy script.

Testing

Uses Orchestra Testbench. ReadOnlyQueryRunner's pre-connect guard is covered directly; a full round trip against a live MySQL/Postgres instance is exercised manually / in a host app's own test suite, not here.


All versions of liquid-monitor-connector-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/console Version ^11.0|^12.0|^13.0
monolog/monolog Version ^3.0
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 liquiddesign/liquid-monitor-connector-laravel contains the following files

Loading the files please wait ...