PHP code example of nativephp / laravel-cloud-deploy

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

    

nativephp / laravel-cloud-deploy example snippets


'databases' => [
    'main' => [
        'type' => 'laravel_mysql',
        'version' => '8.4',
        'region' => 'us-east-2',
        'config' => [
            'size' => 'mysql-flex-512mb',
            'storage' => 5,
            'is_public' => false,
            'uses_scheduled_snapshots' => true,
            'retention_days' => 7,
        ],
        // production gets a database called "production", staging one called "stage_db"
        'environments' => ['production', 'staging' => 'stage_db'],
    ],
],
bash
php artisan vendor:publish --tag=cloud-config
bash
php artisan cloud:deploy
bash
php artisan cloud:deploy production
bash
php artisan cloud:deploy --dry-run
bash
php artisan cloud:deploy --skip-deploy --force
bash
php artisan cloud:deploy production --force