Download the PHP package axvi/laravel-maintenance without Composer

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

axvi/laravel-maintenance

Advanced maintenance mode management for Laravel 10, 11 and 12.

Latest Version on Packagist

Features

Requirements

PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Laravel 10 yes yes yes yes
Laravel 11 yes yes yes yes
Laravel 12 yes yes yes yes

Installation

Run migrations:

Migrations are loaded automatically. If you need to customize them:

Optionally publish the config:

Optionally publish the 503 view:

Configuration

After publishing, the config file is located at config/maintenance.php:

Usage

Enable maintenance mode

Disable maintenance mode

Check status

Manage IPs

Manage tokens

Bypass methods

URL bypass (web)

Visit https://yourapp.com/maintenance/{secret-token} — sets a bypass cookie valid for 12 hours.

The route prefix is configurable via bypass_route.prefix in the config. You can also disable URL bypass entirely by setting bypass_route.enabled to false.

Header bypass (API)

The header name is configurable via middleware.header_name in the config.

Exclude paths

Some URLs should always be accessible, even during maintenance. Add patterns to the except array:

Supports wildcards via Laravel's Request::is().

Caching

By default, the package caches the maintenance state and IP whitelist to avoid database queries on every HTTP request. The cache is automatically invalidated when you enable/disable maintenance or modify the IP whitelist.

To disable caching:

To use a specific cache store (e.g. Redis):

Programmatic usage

Events

Event Properties
MaintenanceModeEnabled string $message, ?string $endsAt
MaintenanceModeDisabled
MaintenanceBypassGranted string $type (ip/cookie/header/url), string $value

How it works

This package replaces Laravel's built-in PreventRequestsDuringMaintenance middleware with its own CheckMaintenanceMode middleware. The bypass check order is:

  1. Excluded paths — URLs matching except patterns are always allowed
  2. IP whitelist — if the request IP is in the maintenance_ips table (cached)
  3. Cookie — if the request has a valid bypass cookie
  4. Header — if the request has a valid token in the X-Maintenance-Token header
  5. 503 response — HTML page with countdown (or JSON for API requests)

All state is stored in the database, so maintenance mode works consistently across multiple application servers. Lookups are cached to minimize performance impact.

Testing

Or directly:

License

MIT — see LICENSE.md.


All versions of laravel-maintenance with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/cache Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.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 axvi/laravel-maintenance contains the following files

Loading the files please wait ...