PHPackages                             mr-feek/laravel-git-hooks - 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. mr-feek/laravel-git-hooks

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

mr-feek/laravel-git-hooks
=========================

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

v0.5.1(8y ago)112.3k6[3 issues](https://github.com/mr-feek/LaravelGitHooks/issues)MITPHPPHP ~5.6|~7.0

Since Sep 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mr-feek/LaravelGitHooks)[ Packagist](https://packagist.org/packages/mr-feek/laravel-git-hooks)[ Docs](https://github.com/mr-feek/LaravelGitHooks)[ RSS](/packages/mr-feek-laravel-git-hooks/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (9)Versions (22)Used By (0)

Laravel Git Hooks
=================

[](#laravel-git-hooks)

[![Laravel Git Hooks](https://camo.githubusercontent.com/af60e5ab520589177182f5d333b8c6f59df199132ca7d3743f8b33a6a5571269/68747470733a2f2f692e696d6775722e636f6d2f677548753565702e706e67)](https://camo.githubusercontent.com/af60e5ab520589177182f5d333b8c6f59df199132ca7d3743f8b33a6a5571269/68747470733a2f2f692e696d6775722e636f6d2f677548753565702e706e67)

This is a community project and not an "official" Laravel one
-------------------------------------------------------------

[](#this-is-a-community-project-and-not-an-official-laravel-one)

[![Latest Stable Version](https://camo.githubusercontent.com/ba588ea04d656b1ec85c4ae3434f1c3b4f5361a00978dce45032160401bcc994/68747470733a2f2f706f7365722e707567782e6f72672f6d722d6665656b2f6c61726176656c2d6769742d686f6f6b732f762f737461626c65)](https://packagist.org/packages/mr-feek/laravel-git-hooks)[![Total Downloads](https://camo.githubusercontent.com/1484f1cc01e3e65cbb76542b10dc94963d855ef2d1d8ef5dd2194cbdd8d52e1f/68747470733a2f2f706f7365722e707567782e6f72672f6d722d6665656b2f6c61726176656c2d6769742d686f6f6b732f646f776e6c6f616473)](https://packagist.org/packages/mr-feek/laravel-git-hooks)[![License](https://camo.githubusercontent.com/869eefe4984bd4359511e7b05319c40ba18c3334fe9241f0523709faec7a36cb/68747470733a2f2f706f7365722e707567782e6f72672f6d722d6665656b2f6c61726176656c2d6769742d686f6f6b732f6c6963656e7365)](https://packagist.org/packages/mr-feek/laravel-git-hooks)[![Build Status](https://camo.githubusercontent.com/e765358d75935e39fb5944c2d3c5f2405a1edad6594f0a7932b95464707b992a/68747470733a2f2f7472617669732d63692e6f72672f6d722d6665656b2f4c61726176656c476974486f6f6b732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mr-feek/LaravelGitHooks)

This package provides a way to add custom git hooks to your laravel project. Easily configure any command to be fired throughout the git-hook process. Want to ensure that all tests pass before a bad commit is pushed? Now's your chance!

Currently, the following git hooks are supported:

- pre-commit
- prepare-commit-msg
- pre-push
- post-checkout

Install
-------

[](#install)

Via Composer

```
$ composer require mr-feek/laravel-git-hooks --dev
```

Edit your laravel project's `composer.json` so that these hooks are installed for every developer after they use composer.

```
"post-autoload-dump": [
    ...
    "@php artisan hooks:install"
]

```

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

[](#configuration)

- Publish this package's configuration file: `php artisan vendor:publish --provider="Feek\LaravelGitHooks\LaravelGitHooksServiceProvider"`
- Register specific artisan commands to be run in the configuration array. For example, all commands nested within the `pre-commit` array key will be run prior to a git commit. All commands nested within the `pre-push` array key will be run prior to a git push. If any of these registered commands fail, then the git action will be prevented.

```
