Automatically Upgrade your Laravel Application with this Package

The Laravel Updater package is a CLI command that can check for new versions of your application and upgrade to the latest version with one command.

It works by running the php artisan updater:update command, which checks for a new release on GitHub, updates to the latest version, and does the following:

  • Check if there is a new version of your application.
  • Download the new version using git commands.
  • Run the migrations.
  • Run the seeders
  • Clear the cache
  • Run the optimize command
  • Run the after-update pipelines

This package has some configuration options, such as turning on maintenance mode before the update and then disabling it after the update completes. You can also run custom pipelines before and after the update. Lastly, you can define a custom "repository source" that would enable you to check whatever source you want to see if updates are available.

If you want to update the application via a user interface programmatically, you can run the following method provided by this package:

use Salahhusa9\Updater\Facades\Updater;

Updater::update();

Check out the Laravel Updater documentation for setup instructions and package configuration options.


The post Automatically Upgrade your Laravel Application with this Package appeared first on Laravel News.

Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.

Read more

© 2024 Extly, CB - All rights reserved.