PHP code example of daltcore / laravel-deploy-helper

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

    

daltcore / laravel-deploy-helper example snippets




return [
    'default' => [
        'stage' => 'production',
    ],

    'stages' => [
        'production' => [
            'git' => '',

            'branch' => '',

            'connection' => [
                'host'     => '',
                'username' => '',
                'password' => '',
                // 'key'       => '',
                // 'keytext'   => '',
                // 'keyphrase' => '',
                // 'agent'     => '',
                'timeout'  => 10,
            ],

            'remote' => [
                'root' => '/var/www',
            ],

            'commands' => [
                'composer install',
            ],

            'shared' => [
                'directories' => [
                    'public',
                    'storage',
                ],
                'files'       => [
                    '.env',
                ],
            ],

            'config' => [
                'dependencies' => [
                    'php' => '>=5.6',
                    'git' => true,
                ],
                'keep'         => 4,
            ],
        ],
    ],
];

 php
DALTCORE\LaravelDeployHelper\LdhServiceProvider::class,
bash
$ php artisan vendor:publish --tag=ldh-config
bash
php artisan ldh:deploy --stage=production --branch=develop
bash
php artisan ldh:patch --stage=production --branch=patch
bash
php artisan ldh:rollback --stage=production