PHP code example of suhailparad / lara-command-chain

1. Go to this page and download the library: Download suhailparad/lara-command-chain 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/ */

    

suhailparad / lara-command-chain example snippets


return [
    'chains' => [
        'setup' => [
            'php artisan migrate:fresh',
            'php artisan db:seed',
            'php artisan cache:clear',
        ],
        'deploy' => [
            'php artisan down',
            'composer update',
            'npm install',
            'php artisan migrate',
            'php artisan up',
        ],
    ],
];

'chains' => [
    'build' => [
        'npm install',
        'npm run build',
    ],
    'deploy' => [
        'php artisan down',
        'composer install',
        'php artisan migrate',
        'php artisan up',
    ],
];
bash
php artisan vendor:publish --tag=command-chain-config
bash
php artisan chain:run setup
php artisan chain:run deploy
bash
⏭️  [1/4] php artisan down ... skipped (dry run)
⏭️  [2/4] composer update ... skipped (dry run)
⏭️  [3/4] php artisan migrate ... skipped (dry run)
⏭️  [4/4] php artisan up ... skipped (dry run)
bash
php artisan chain:run build
php artisan chain:run deploy