PHPackages                             anisaronno/laravel-self-updater - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. anisaronno/laravel-self-updater

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

anisaronno/laravel-self-updater
===============================

Laravel Self Updater is a package that helps you to update your Laravel application automatically.

0.3.2(1y ago)03111MITPHPPHP ^8.1

Since Oct 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/anisAronno/laravel-self-updater)[ Packagist](https://packagist.org/packages/anisaronno/laravel-self-updater)[ Docs](https://github.com/anisAronno/laravel-self-updater)[ Fund](https://www.buymeacoffee.com/anisaronno)[ RSS](/packages/anisaronno-laravel-self-updater/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (15)Used By (1)

Laravel Self Updater
====================

[](#laravel-self-updater)

A robust Laravel package facilitating automatic updates from GitHub, GitLab, Bitbucket, or custom repositories for your Laravel applications.

**Supports Laravel version 10 and above.**

Table of Contents
-----------------

[](#table-of-contents)

- [Laravel Self Updater](#laravel-self-updater)
    - [Table of Contents](#table-of-contents)
    - [Features](#features)
    - [Installation](#installation)
    - [Configuration](#configuration)
        - [Environment Variables](#environment-variables)
        - [Config File](#config-file)
        - [Excluding Items from Updates](#excluding-items-from-updates)
        - [Setting Middleware](#setting-middleware)
        - [Application Version](#application-version)
        - [Composer Dependencies](#composer-dependencies)
        - [Custom VCS Providers](#custom-vcs-providers)
    - [Usage](#usage)
        - [Checking for Updates](#checking-for-updates)
        - [Initiating Updates](#initiating-updates)
        - [Scheduling Automatic Updates](#scheduling-automatic-updates)
        - [Handling Modified Files](#handling-modified-files)
    - [Custom Update Sources](#custom-update-sources)
    - [API Integration](#api-integration)
    - [Blade Component](#blade-component)
    - [Contributing](#contributing)
    - [License](#license)

Features
--------

[](#features)

- **Multi-source Support**: Update from GitHub, GitLab, Bitbucket, or custom repositories
- **Simple Configuration**: Easy setup via environment variables and config file
- **Built-in Commands**: Convenient commands for update checks and initiation
- **File Exclusion**: Protect sensitive files/folders during updates
- **Error Handling**: Comprehensive logging and error management
- **Version Tracking**: Utilizes `composer.json` for version management
- **UI Integration**: Global Blade component for easy frontend implementation
- **API Endpoints**: Programmatic update management
- **Security**: Configurable middleware for API protection
- **Composer Integration**: Optional management of Composer dependencies during updates
- **Extensibility**: Support for custom VCS providers

Installation
------------

[](#installation)

1. Install the package via Composer:

    ```
    composer require anisaronno/laravel-self-updater
    ```
2. Publish the configuration file:

    ```
    php artisan vendor:publish --tag=self-updater-config
    ```

    This creates `self-updater.php` in your `config` directory.
3. (Optional) Publish assets and views:

    ```
    php artisan vendor:publish --tag=self-updater-assets
    php artisan vendor:publish --tag=self-updater-views
    ```

Configuration
-------------

[](#configuration)

### Environment Variables

[](#environment-variables)

Add these to your `.env` file:

```
RELEASE_URL=https://github.com/anisAronno/laravel-starter
LICENSE_KEY=your_optional_purchase_key
```

- `RELEASE_URL`: Your repository's release URL
- `LICENSE_KEY`: (Optional) For authenticated APIs or private repos

### Config File

[](#config-file)

The `config/self-updater.php` file contains important settings:

1. **Repository Configuration**: Uses `VCSProviderFactory` to create an appropriate adapter based on your `RELEASE_URL`.
2. **Excluded Items**: Define files and folders to exclude from updates.
3. **Middleware**: Specify which middleware to apply to the self-updater's API endpoints.
4. **Composer Dependencies**: Configure whether to run Composer install or update during the update process.

### Excluding Items from Updates

[](#excluding-items-from-updates)

Edit the `exclude_items` array in `config/self-updater.php`:

```
"exclude_items" => [
    '.env',
    '.git',
    'storage',
    'node_modules',
    'vendor',
    // Add your custom exclusions here
],
```

### Setting Middleware

[](#setting-middleware)

Configure the middleware in `config/self-updater.php`:

```
"middleware" => ['web'],
```

### Application Version

[](#application-version)

Specify your app's version in `composer.json`:

```
{
  "version": "1.0.0"
}
```

### Composer Dependencies

[](#composer-dependencies)

Configure Composer behavior during updates in `config/self-updater.php`:

```
'require_composer_install' => false,
'require_composer_update' => false,
```

Set these to `true` to run Composer install or update respectively during the update process.

### Custom VCS Providers

[](#custom-vcs-providers)

Extend functionality with custom VCS providers:

```
use AnisAronno\LaravelSelfUpdater\Services\VCSProvider\VCSProviderFactory;

// Register a new provider
VCSProviderFactory::registerProvider('custom-vcs.com', YourCustomVCSProvider::class);

// Remove a provider
VCSProviderFactory::removeProvider('custom-vcs.com');

// Check if a provider is registered
$isRegistered = VCSProviderFactory::hasProvider('custom-vcs.com');

// Get all registered providers
$providers = VCSProviderFactory::getProviders();
```

Ensure your custom provider implements `VCSProviderInterface`.

After configuration changes, refresh the config cache:

```
php artisan config:cache
```

Usage
-----

[](#usage)

### Checking for Updates

[](#checking-for-updates)

Run the following command to check for available updates:

```
php artisan update:check
```

### Initiating Updates

[](#initiating-updates)

To start the update process, use:

```
php artisan update:initiate
```

### Scheduling Automatic Updates

[](#scheduling-automatic-updates)

For Laravel 10, add to `app/Console/Kernel.php`:

```
protected function schedule(Schedule $schedule)
{
    $schedule->command('update:initiate')->dailyAt('01:00');
}
```

For Laravel 11+, add to `routes/console.php`:

```
use Illuminate\Support\Facades\Schedule;

Schedule::command('update:initiate')->dailyAt('01:00');
```

### Handling Modified Files

[](#handling-modified-files)

The updater will warn about modified project files, excluding `.env` and `storage/`.

Custom Update Sources
---------------------

[](#custom-update-sources)

For custom update sources, ensure your API returns:

```
{
  "version": "1.0.0",
  "download_url": "https://example.com/api/v1/release",
  "release_date": "01-02-2024",
  "changelog": "Your changelog text"
}
```

API Integration
---------------

[](#api-integration)

Access these endpoints for programmatic updates:

- Check for updates: `GET /api/self-updater/check`
- Initiate update: `POST /api/self-updater/update`

These endpoints are protected by the middleware specified in the config file.

Blade Component
---------------

[](#blade-component)

Use the global component in your views:

```

```

Contributing
------------

[](#contributing)

We welcome contributions! Please see our [Contribution Guide](https://github.com/anisAronno/laravel-self-updater/blob/develop/CONTRIBUTING.md) for details.

License
-------

[](#license)

This package is open-source software licensed under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

13

Last Release

566d ago

PHP version history (2 changes)0.0.1PHP ^7.4|^8.0

0.2.2PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec2b9e2be2157130259ea94f8d96649bf9f060aa3534d00529a80f5f38c74d71?d=identicon)[anisAronno](/maintainers/anisAronno)

---

Top Contributors

[![anisAronno](https://avatars.githubusercontent.com/u/38912435?v=4)](https://github.com/anisAronno "anisAronno (134 commits)")

---

Tags

autoupdaterhactoberfestlaravelpackageselfupdateupdaterlaravelpackageupdaterself-updater

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/anisaronno-laravel-self-updater/health.svg)

```
[![Health](https://phpackages.com/badges/anisaronno-laravel-self-updater/health.svg)](https://phpackages.com/packages/anisaronno-laravel-self-updater)
```

###  Alternatives

[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
