PHPackages                             webklex/laravel-git-hook - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. webklex/laravel-git-hook

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

webklex/laravel-git-hook
========================

Laravel Git Hook

1.0.1.7(8y ago)171.2k3[2 issues](https://github.com/Webklex/laravel-git-hook/issues)MITPHPPHP &gt;=5.5.9

Since Mar 4Pushed 8y ago3 watchersCompare

[ Source](https://github.com/Webklex/laravel-git-hook)[ Packagist](https://packagist.org/packages/webklex/laravel-git-hook)[ Docs](https://github.com/webklex/laravel-git-hook)[ RSS](/packages/webklex-laravel-git-hook/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

Git hook deployment made for Laravel
====================================

[](#git-hook-deployment-made-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/83fe6ef76096b47c762b5ab0fe364b320c0e9b810ea1f583659568d5a50101ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f5765626b6c65782f6c61726176656c2d6769742d686f6f6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Webklex/laravel-git-hook)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/fc3c27fa4c401204a6502aa5b5b87fc64f5cb84ff16a904845407ba599f82749/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5765626b6c65782f6c61726176656c2d6769742d686f6f6b2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Webklex/laravel-git-hook)[![Total Downloads](https://camo.githubusercontent.com/c216d7d21c56df30d43ca26d15e72cbd7cbf4c6d940bae5bdce12555d81d3d7e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f5765626b6c65782f6c61726176656c2d6769742d686f6f6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Webklex/laravel-git-hook)

Install
-------

[](#install)

Via Composer

```
$ composer require webklex/laravel-git-hook
```

Setup
-----

[](#setup)

Add the service provider to the providers array in `config/app.php`.

```
'providers' => [
    Webklex\GitHook\Providers\LaravelServiceProvider::class,
];
```

Publishing
----------

[](#publishing)

You can publish everything at once

```
php artisan vendor:publish --provider="Webklex\GitHook\Providers\LaravelServiceProvider"
```

Usage
-----

[](#usage)

This library is designed to handle the automatic deployment by git hooks as simple as possible. There isn't much todo to get started: just add the Provider and edit the `config/git-hook.php` file to make it fit your needs.

Custom configuration can be made within the `config/git-hook.php` file:

ParameterDefaultOptionsDescriptionemail\_recipients`[]``[['name' => '', 'address' => ''], ...]`Get notified by mail. Just add your credentialsemail\_email\_sender`['address' => '', 'name' => '']``['address' => '', 'name' => '']`Specify a custom email sender addressrepo\_path`null`Leave empty to auto detect the vcs rootPerhaps your repository is somehow specially structured, if that's the case, specify your repository pathallowed\_sources`[]``['192.168.1.1', '192.168.1.2', ...]`If you want to secure the deployment process a bit more, whitelist the remote repository IPsremote`origin`Your remote branch namegit\_path`/usr/bin/git`Where is the git binary locatedlogfile`git-hook`Name of the logfile. It will be stored under storage/logsservice`github``github`, `gitbucket`, `gitlab`Define your remote git service. This is required to identify the payloadurl`git-hook`Define the deployment url. Keep in mind, that the given parameter will be added to your app.urlbefore\_pull`[]``['down', ['cmd', ['arg1' => 1]]]`If you have any commands that have to be called before a pull event, specify them hereafter\_pull`[]``['cmd', ['cmd1', ['arg1' => 1]], 'up']`If you have any commands that have to be called after a pull event, specify them hereIf you are concerned someone could guess it, use a more cryptic url such as: `JHFUjhd67567JHFGhsd78236784wegfJHFghdgf`

Potential problems:
-------------------

[](#potential-problems)

Please make sure your `www-data` user can actually perform a git pull on the server without having to enter a password: so you might want to take a look at ssh-keys or something similar

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Webklex](https://github.com/webklex)
- All Contributors

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~41 days

Recently: every ~62 days

Total

7

Last Release

3156d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2884144?v=4)[webklex](/maintainers/webklex)[@Webklex](https://github.com/Webklex)

---

Top Contributors

[![Webklex](https://avatars.githubusercontent.com/u/2884144?v=4)](https://github.com/Webklex "Webklex (19 commits)")

---

Tags

auto-deploymentdeploymentgitgit-hooklaravellaravelgitHOOKdeploymentwebklexgit hooklaravel-git-hooklaravel deploymentauto deployment

### Embed Badge

![Health badge](/badges/webklex-laravel-git-hook/health.svg)

```
[![Health](https://phpackages.com/badges/webklex-laravel-git-hook/health.svg)](https://phpackages.com/packages/webklex-laravel-git-hook)
```

###  Alternatives

[fadion/maneuver

Easily deploy Laravel projects via FTP or SFTP, using Git for versioning.

1729.1k](/packages/fadion-maneuver)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[innocenzi/deployer-recipe-forge

Seamless zero-downtime deployment on Forge with Deployer

1916.6k](/packages/innocenzi-deployer-recipe-forge)

PHPackages © 2026

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