PHPackages                             vetruvet/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. vetruvet/laravel-self-updater

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

vetruvet/laravel-self-updater
=============================

Git webhook self-updater for Laravel

v1.0.0-beta4(11y ago)102083[1 issues](https://github.com/vetruvet/laravel-self-updater/issues)Apache-2.0PHPPHP &gt;=5.3.0

Since Jul 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/vetruvet/laravel-self-updater)[ Packagist](https://packagist.org/packages/vetruvet/laravel-self-updater)[ RSS](/packages/vetruvet-laravel-self-updater/feed)WikiDiscussions master Synced 3d ago

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

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

[](#laravel-self-updater)

This provides automatic self-update functionality for Laravel 4.x projects using git with a central git server that supports webhooks (like Github or Gitlab).

What it does
------------

[](#what-it-does)

The updater is triggered by a POST request executed by the git server when a push occurs. Once triggered it does:

1. Checks that the push was to the branch it is configured for
2. Fire pre-update event listener
3. Checks tree status to make sure it is clean before pulling
4. Execute `git pull`.
5. Get the current commit hash (for display purposes)
6. Get the list of commits pulled.
7. Rebuild optimized class file (`clear-compiled`, `dump-autoload`, `optimize`)
8. Run all migrations
9. Fire post-update event listener
10. Optionally notify of the update status by email

Requirements
------------

[](#requirements)

- Laravel 4.x
- Your git project in a git repository that has webhooks
- git installed on the web server

Install
-------

[](#install)

Require this package in your composer.json and run composer update (or run `composer require vetruvet/laravel-self-updater:dev-master` directly):

```
"vetruvet/laravel-self-updater": "dev-master"

```

After updating composer, add the ServiceProvider to the providers array in app/config/app.php

```
'Vetruvet\LaravelSelfUpdater\SelfUpdaterServiceProvider',
```

Configure
---------

[](#configure)

To customize the configuration, run the following command:

```
$ php artisan config:publish vetruvet/laravel-self-updater

```

Configuration options:

```
