PHP code example of avengerscodelovers / laravel-cs

1. Go to this page and download the library: Download avengerscodelovers/laravel-cs 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/ */

    

avengerscodelovers / laravel-cs example snippets

bash
./vendor/bin/php-cs-fixer fix --config=./vendor/avengerscodelovers/laravel-cs/.php-cs-fixer.dist.php
bash
./vendor/bin/php-cs-fixer fix --dry-run -v --config=./vendor/avengerscodelovers/laravel-cs/.php-cs-fixer.dist.php
json
    "scripts": {
        "cs": "php-cs-fixer fix --dry-run -v --config=./vendor/avengerscodelovers/laravel-cs/.php-cs-fixer.dist.php",
        "cs:fix": "php-cs-fixer fix -v --config=./vendor/avengerscodelovers/laravel-cs/.php-cs-fixer.dist.php",
    }
json
"scripts": {
    "phpstan": "phpstan analyse --memory-limit 2G"
}
json
"lint-staged": {
    "*.php": [
        "composer cs:fix",
        "composer phpstan"
    ]
}