PHP code example of mr-feek / laravel-git-hooks

1. Go to this page and download the library: Download mr-feek/laravel-git-hooks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mr-feek / laravel-git-hooks example snippets



return [
    'commit-msg' => [
        //
    ],
    'pre-commit' => [
        'php artisan hooks:phpcs --diff --proxiedArguments="-p -n --standard=PSR2"',
        'php artisan hooks:eslint --diff --proxiedArguments="--fix --quiet"',
    ],
    'pre-push' => [
        './vendor/bin/phpunit'
    ],
    'post-checkout' => [
        'php artisan hooks:install-deps'
    ],
    'prepare-commit-msg' => [
        'php artisan hooks:semantic-commits',
    ],
];

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