Download the PHP package churchportal/laravel-scheduled-maintenance without Composer

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

Laravel Scheduled Maintenance

This package enables you to schedule maintenance windows for your Laravel application, make it easier to notify users about upcoming maintenance, and also customize the user experience for your users while the application is down for maintenance.

It's built in a similar fashion to laravel's preexisting down and up commands with support for bypass mode, redirects, and custom HTTP status codes.

NOTE: This package does rely on your database, if you are preforming significant DB work during a maintenance window then you may want to consider using laravel's down for that work instead.

Installation

Install the package via composer:

Publish the package assets (this will publish the config file, 1 migration, and an example blade view):

Run the migration:

Configuration

The app('maintenance') singleton

The ScheduledMaintenace class is bound to the container via the maintenance key. These class methods enable you to:

Artisan Commands

maintenance:schedule

This command will walk you through the process of creating a new maintenance window. You'll be prompted for information like when the maintenance will start, when users should see a notification about the upcoming maintenance, etc.

maintenance:down

This command will immediately move your application into maintenance mode! When running this command the package will either move your next scheduled maintenance window into an active state or it will create a new record if there isn't one already scheduled.

Options when creating a new record:

maintenance:up

This command will move your application out of maintenance mode

maintenance:upcoming

This command will list all of your future maintenance windows in a table format

maintenance:cancel {id}

This command will delete a scheduled maintenance window

Events

All events include a public $scheduledMaintenace model property

MaintenanceScheduled

This event is triggered after scheduling maintenance using the maintenance:schedule command

MaintenanceStarted

This event is triggered after running app('maintenance')->down(). There is an additional $wasPreviouslyScheduled property that will be false if the maintenance was started without being previous scheduled.

MaintenanceCompleted

This event is triggered after running app('maintenance')->up()

MaintenanceCancelled

This event is triggered after running app('maintenance')->delete($id)

Usage

Display notice to users about upcoming maintenance

Using the app('maintenance')->notice() method you'll have access to the details about the next upcoming maintenance window

in blade

in inerita

image

Bypassing maintenance mode

You can bypass maintenance mode by navigating to the bypass_secret url. It can be useful when testing your application to remember that it's still in maintenance mode. Here are some examples of how you can implement that notice:

in blade

in inerita

image


All versions of laravel-scheduled-maintenance with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
calebporzio/sushi Version ^2.2
illuminate/contracts Version ^8.37
spatie/laravel-package-tools Version ^1.4.3
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 churchportal/laravel-scheduled-maintenance contains the following files

Loading the files please wait ....