PHP code example of exolnet / laravel-envoy

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

    

exolnet / laravel-envoy example snippets


    

    return [
        'name' => 'example',

        'default' => 'production',

        'environments' => [
            'production' => [
                'ssh_host'       => 'example.com',
                'ssh_user'       => 'example',
                'deploy_path'    => '/srv/example',
                'repository_url' => '[email protected]:example/example.git',
                'linked_files'   => ['.env'],
                'linked_dirs'    => ['storage/app', 'storage/framework', 'storage/logs'],
                'copied_dirs'    => ['node_modules', 'vendor'],
            ],
        ],
    ];
    
blade
    @import('exolnet/laravel-envoy')

    @task('deploy:publish')
        cd "{{ $releasePath }}"

        php artisan down

        php artisan config:cache
        php artisan event:cache
        php artisan route:cache
        php artisan view:cache

        php artisan storage:link

        php artisan migrate --force

        php artisan up
    @endtask