Download the PHP package smwks/laravel-zenith without Composer

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


Zenith For Laravel

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Think Laravel Horizon, but for database-backed queues. Zenith brings the same real-time visibility and worker management that Horizon provides for Redis — to the database queue driver.

If you're running queues out of your database and want a live dashboard, worker process management, and job lifecycle tracking without switching to Redis, Zenith is built for you. See pending, processing, completed, and failed jobs alongside the worker processes handling them. Scale workers up or down, terminate supervisors, retry failures in bulk, and track performance over time — all from your browser, all without leaving your application.


Quick Install

Then visit /zenith in your browser. The dashboard is protected by the auth middleware by default.

Start workers with:

Add the monitor to your scheduler in routes/console.php:


Run A Demo

Spin up a fresh Laravel app with Zenith installed in under a minute:

Notes:

Then browse to http://localhost:8000/zenith to see the dashboard.


Features

Live Dashboard

A real-time overview of your queue system refreshing every 5 seconds. At a glance: how many workers are active, how many are idle or stuck, jobs pending and completed today, average processing time, throughput (jobs/hour), and failure rate.

Job Visibility Across the Full Lifecycle

Browse every stage of a job's journey across dedicated tabs:

Worker Management

The Workers page shows the full supervisor/child process hierarchy. For each supervisor you see its queue, connection, worker count, total jobs processed, last heartbeat, and uptime. For each child worker you see individual job counts, health status, and a "Stuck" indicator when a heartbeat goes missing.

From the UI you can:

Supervisor Groups & Balance Strategies

Each zenith:work invocation is tied to a named supervisor group defined in config/zenith.php. Groups configure the queue, connection, and — importantly — the balance strategy:

Strategy Behaviour
fixed Workers start at min_workers and stay there. Scale Up/Down hidden in the UI. Ideal for Kubernetes pods or any environment where the process supervisor controls scale.
manual Workers start at min_workers. Scale Up/Down buttons are visible in the dashboard. Operator-driven scaling within min_workers/max_workers bounds.
automatic Workers start at min_workers and scale to demand on every heartbeat tick. Scale target is ceil(pending_jobs / jobs_per_worker), clamped to min_workers/max_workers. Scales up to target immediately; scales down one step per tick only when the queue is empty.

Heartbeat-Based Health Monitoring

Every worker reports a heartbeat on a configurable interval (default: 30 seconds). The zenith:monitor command — run every minute via the scheduler — compares last heartbeat times against a configurable stuck threshold (default: 120 seconds). Workers that go silent are marked terminated; jobs held by those workers can be automatically released back to the queue.

Job Lifecycle Events

Zenith hooks into Laravel's job events to record a JobEvent at every transition: started, completed, failed, retried, cancelled. Each event captures the queue, connection, attempt count, and processing time. The event log is the foundation for metrics, audit trails, and debugging.

API

All dashboard data is also available via JSON endpoints under /zenith/api/ — useful for external monitoring systems or custom tooling.

Endpoint Description
GET /zenith/api/metrics Full metrics snapshot
GET /zenith/api/metrics/workers Worker counts
GET /zenith/api/metrics/jobs Job counts
GET /zenith/api/metrics/performance Throughput and timing
GET /zenith/api/metrics/queues Per-queue pending counts
GET /zenith/api/workers Worker list
GET /zenith/api/workers/{id} Worker detail
GET /zenith/api/jobs Pending jobs
GET /zenith/api/jobs-history Completed/cancelled jobs
GET /zenith/api/jobs-failed Failed jobs
DELETE /zenith/api/jobs/{id} Cancel a pending job
POST /zenith/api/jobs/{id}/retry Retry a failed job
POST /zenith/api/jobs/retry-all Retry all failed jobs

Built-In Test Dispatcher

The Tests tab dispatches real jobs through your queue so you can verify the full stack is wired up correctly. Dispatch a single job or a batch of configurable size, with optional logging enabled, and watch them flow through the dashboard in real time.


Installation

1. Install via Composer

2. Publish and Run Migrations

This creates three tables: zenith_processes, zenith_history, and zenith_events.

3. Publish the Config (optional)

4. Publish the Views (optional)


Artisan Commands

zenith:work

The primary worker command. Replaces queue:work with full Zenith monitoring.

Option Default Description
--name default Supervisor group name — must match a key in config('zenith.supervisors') to pick up its balance strategy and worker bounds
--queue Comma-separated queue names (overrides the group's configured queue)
--memory 128 Memory limit in MB
--timeout 60 Max seconds a job may run
--sleep 3 Seconds to sleep when queue is empty
--tries 1 Max attempts before a job is failed
--backoff 0 Seconds to wait between retries
--max-jobs 0 Stop after processing this many jobs (0 = unlimited)
--max-time 0 Stop after this many seconds (0 = unlimited)
--stop-when-empty Stop when the queue is drained
--force Run even in maintenance mode

zenith:monitor

Detects stuck workers and optionally releases their held jobs back to the queue. Run this every minute via the scheduler.

zenith:prune

Removes old records to keep the database lean. Safe to schedule daily.

Option Default Description
--completed 7 Days to retain completed job history
--failed 30 Days to retain failed job records
--events 7 Days to retain job events
--all Prune all types at once using config defaults

Configuration

Multiple named groups are supported — useful when different queues need different strategies:

Then start each group as a separate process:


Recommended Scheduler Setup


How It Works

Process Model

zenith:work starts a supervisor process that manages a pool of child worker processes. Each child runs queue:work under the hood. The supervisor monitors its children and respawns them if they exit, and listens for scaling instructions delivered via the heartbeat action column in the database.

Heartbeats

On every worker loop iteration, Zenith updates last_heartbeat_at in the zenith_processes table for both the worker and its supervisor. zenith:monitor compares these timestamps against stuck_job_threshold and marks unresponsive processes as terminated. If auto_retry_stuck_jobs is enabled, any job the stuck worker was holding gets released back to the queue automatically.

Job Events

Zenith registers listeners for Laravel's built-in job lifecycle events:

Laravel Event Zenith Action
JobProcessing Records a started event, marks worker as working
JobProcessed Records a completed event, writes JobHistory, marks worker idle, increments jobs_completed
JobFailed Records a failed event, captures exception, writes JobHistory, increments jobs_failed

Each JobHistory record stores the full payload, processing time in milliseconds, attempt count, queue, and connection. The JobEvent log provides the per-transition audit trail that drives the dashboard metrics.

Dashboard Metrics

The MetricsService computes all metrics on demand from the Zenith tables:


Testing


Changelog

Please see CHANGELOG for recent changes.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-zenith with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-pcntl Version *
illuminate/contracts Version ^11.0||^12.0||^13.0
livewire/livewire Version ^4.0
smwks/superprocess Version ^0.2
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 smwks/laravel-zenith contains the following files

Loading the files please wait ...