2 Minute Install Guide

  1. Install via Composer (Find details on Composer here).
    Run this command:
  2. Now that it is installed, you should run the following to copy the config file over:
    Run this command:
  3. Add this to your layouts/template file (so that the user can see any generated message):
    {!! !empty($willbedowntimeetc_schedule) ? $willbedowntimeetc_schedule->getMessage() : "" !!}
  4. Optional: Look in the config/willbedownetc.php file and make any changes as required.
  5. Installation Complete! There isn't much to do really!

How to use it once installed

  • So you have a laravel website, and you are going to need to make the site go offline. Run this command (change 15 to however many MINUTES until the planned downtime) to show a notice:
  • php artisan webdevetc:willbedown:start 15
  • Then 15 mins later you can either shut the server down, or run php artisan down (the built in Laravel command)
  • Once you are ready to get the site up again, run php artisan webdevetc:willbedown:removemessage. This command automatically runs php artisan up so your site should be up now!
  • You can also use the optional --expected_downtime_duration=30 option to indicate that you expect there to be 30 minutes of downtime. (It will default to 10). You can use this value in the messages output to the user.

Events

You can find all the events that are fired by looking in the /src/Events directory.

Add these (and an Event Listener) to your EventServiceProvider.php file to make use of these events when they fire.

(There is an event listener in WillBeDownEtcServiceProvider.php BTW)

Testing

Tests are included. Please see the tests directory for details.

Reporting Bugs / Security Issues

Please just send me an email via the contact form, I'll get back to you ASAP.

Known issues/notes

None that I know of, but please email me if there are any problems and I'll fix it.