PHPackages                             muyaedward/wbapp-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. muyaedward/wbapp-updater

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

muyaedward/wbapp-updater
========================

Providing an auto-updating functionality for your self-hosted Laravel application.

0.12.6(7y ago)0291MITPHPPHP &gt;=5.5

Since Dec 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/muyaedward/wbapp-updater)[ Packagist](https://packagist.org/packages/muyaedward/wbapp-updater)[ RSS](/packages/muyaedward-wbapp-updater/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Laravel Application Self-Updater
================================

[](#laravel-application-self-updater)

[![Latest Stable Version](https://camo.githubusercontent.com/e6fc6bba685acaac38ec721263953c6fba75e217d2c2e9bd61888a84a6de9846/68747470733a2f2f706f7365722e707567782e6f72672f636f64656467652f6c61726176656c2d73656c66757064617465722f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/codedge/laravel-selfupdater)[![Total Downloads](https://camo.githubusercontent.com/fc877aea94c6037e17ce6a9c141e9e82c05ecc8b5a09badfa20c2af22799909a/68747470733a2f2f706f7365722e707567782e6f72672f636f64656467652f6c61726176656c2d73656c66757064617465722f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/codedge/laravel-selfupdater)[![Build Status](https://camo.githubusercontent.com/e6b2ec08a3f6dc26ddffdbf0cf5553023c1e4ce37e078faf86bae89fd2a0af76/68747470733a2f2f7472617669732d63692e6f72672f636f64656467652f6c61726176656c2d73656c66757064617465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/codedge/laravel-selfupdater)[![StyleCI](https://camo.githubusercontent.com/9a26ffe2e45ef08d73c7c4a8c444b54108ff7429e8019c89a0493c8d225fc6de/68747470733a2f2f7374796c6563692e696f2f7265706f732f36343436333934382f736869656c64)](https://styleci.io/repos/64463948)[![codecov](https://camo.githubusercontent.com/0f8f2bcbe84923cae5f9183549a4f58339a541681de598564935474281422964/68747470733a2f2f636f6465636f762e696f2f67682f636f64656467652f6c61726176656c2d73656c66757064617465722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/codedge/laravel-selfupdater)

This package provides some basic methods to implement a self updating functionality for your Laravel 5 application. Already bundled are some methods to provide a self-update mechanism via Github.

Usually you need this when distributing a self-hosted Laravel application that needs some updating mechanism, as you do not want to bother your lovely users with Git and/or Composer commands ;-)

Install with Composer
---------------------

[](#install-with-composer)

There are currently two branches:

- `master`: Compatible with PHP 7.x
- `5.x`: Compatible with PHP 5.5 + 5.6

*Please select the right branch for your PHP version accordingly.*

To install the latest version from the master using [Composer](https://getcomposer.org/):

```
$ composer require codedge/laravel-selfupdater
```

This adds the *codedge/laravel-selfupdater* package to your `composer.json` and downloads the project.

You need to include the service provider in your `config/app.php` `[1]` and optionally the *facade* `[2]`:

```
// config/app.php

return [

    //...

    'providers' => [
        // ...

        Codedge\Updater\UpdaterServiceProvider::class, // [1]
    ],

    // ...

    'aliases' => [
        // ...

        'Updater' => Codedge\Updater\UpdaterManager::class, // [2]

]
```

Additionally add the listener to your `app/Providers/EventServiceProvider.php`:

```
// app/Providers/EventServiceProvider.php

/**
 * The event handler mappings for the application.
 *
 * @var array
 */
protected $listen = [
    // ...

    \Codedge\Updater\Events\UpdateAvailable::class => [
        \Codedge\Updater\Listeners\SendUpdateAvailableNotification::class
    ],
    \Codedge\Updater\Events\UpdateSucceeded::class => [
        \Codedge\Updater\Listeners\SendUpdateSucceededNotification::class
    ],

];
```

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

[](#configuration)

After installing the package you need to publish the configuration file via

```
$ php artisan vendor:publish --provider="Codedge\Updater\UpdaterServiceProvider"
```

**Note:** Please enter correct value for vendor and repository name in your `config/self-updater.php` if you want to use Github as source for your updates.

### Running artisan commands

[](#running-artisan-commands)

Artisan commands can be run before or after the update process and can be configured in `config/self-updater.php`:

**Example:**

```
'artisan_commands' => [
    'pre_update' => [
        'updater:prepare' => [
            'class' => \App\Console\Commands\PreUpdateTasks::class,
            'params' => []
        ],
    ],
    'post_update' => [
        'postupdate:cleanup' => [
            'class' => \App\Console\Commands\PostUpdateCleanup::class,
            'params' => [
                'log' => 1,
                'reset' => false,
                // etc.
            ]
        ]
    ]
]
```

### Notifications via email

[](#notifications-via-email)

You need to specify a recipient email address and a recipient name to receive update available notifications. You can specify these values by adding `SELF_UPDATER_MAILTO_NAME` and `SELF_UPDATER_MAILTO_ADDRESS` to your `.env` file.

Config nameDescriptionSELF\_UPDATER\_MAILTO\_NAMEName of email recipientSELF\_UPDATER\_MAILTO\_ADDRESSAddress of email recipientSELF\_UPDATER\_MAILTO\_UPDATE\_AVAILABLE\_SUBJECTSubject of update available emailSELF\_UPDATER\_MAILTO\_UPDATE\_SUCCEEDED\_SUBJECTSubject of update succeeded emailUsage
-----

[](#usage)

To start an update process, i. e. in a controller, just use:

```
public function update()
{
    // This downloads and install the latest version of your repo
    Updater::update();

    // Just download the source and do the actual update elsewhere
    Updater::fetch();

    // Check if a new version is available and pass current version
    Updater::isNewVersionAvailable('1.2');
}
```

Of course you can inject the *updater* via method injection:

```
public function update(UpdaterManager $updater)
{

    $updater->update(); // Same as above

    // .. and shorthand for this:
    $updater->source()->update;

    $updater->fetch() // Same as above...
}
```

**Note:** Currently the fetching of the source is a *synchronous* process. It is not run in background.

### Using Github

[](#using-github)

The package comes with a *Github* source repository type to fetch releases from Github - basically use Github to pull the latest version of your software.

Just make sure you set the proper repository in your `config/self-updater.php`file.

Extending and adding new source repository types
------------------------------------------------

[](#extending-and-adding-new-source-repository-types)

You want to pull your new versions from elsewhere? Feel free to create your own source repository type somewhere but keep in mind for the new source repository type:

- It *needs to* extend **AbstractRepositoryType**
- It *needs to* implement **SourceRepositoryTypeContract**

So the perfect class head looks like

```
class BitbucketRepositoryType extends AbstractRepositoryType implements SourceRepositoryTypeContract

```

Afterwards you may create your own [service provider](https://laravel.com/docs/5.2/providers), i. e. BitbucketUpdaterServiceProvider, with your boot method like so:

```
public function boot()
{
    Updater::extend('bitbucket', function($app) {
        return Updater::sourceRepository(new BitbucketRepositoryType);
    });
}
```

Now you call your own update source with:

```
public function update(UpdaterManager $updater)
{
    $updater->source('bitbucket')->update();
}
```

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

[](#contributing)

Please see the [contributing guide](CONTRIBUTING.md).

Roadmap
-------

[](#roadmap)

Just a quickly sketched [roadmap](https://github.com/codedge/laravel-selfupdater/wiki/Roadmap) what still needs to be implemented.

Licence
-------

[](#licence)

The MIT License (MIT). Please see [Licencse file](LICENSE) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

2710d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1068abc44a610494c51024b5a679afcaee66be85d34c9b3f5e2a44672922707e?d=identicon)[kikuyu1](/maintainers/kikuyu1)

---

Top Contributors

[![muyaedward](https://avatars.githubusercontent.com/u/7256186?v=4)](https://github.com/muyaedward "muyaedward (1 commits)")

---

Tags

laravelupdateauto-updateself-updatelaravel applicationself-hosted laravel application

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/muyaedward-wbapp-updater/health.svg)

```
[![Health](https://phpackages.com/badges/muyaedward-wbapp-updater/health.svg)](https://phpackages.com/packages/muyaedward-wbapp-updater)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[adrianorosa/laravel-geolocation

Laravel Geo Location package to get details for a given IP Address

6593.3k1](/packages/adrianorosa-laravel-geolocation)[bakame/laravel-domain-parser

Laravel package to integrate PHP Domain parser.

26534.8k4](/packages/bakame-laravel-domain-parser)

PHPackages © 2026

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