PHP code example of codegreencreative / laravel-heroku-deploy

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

    

codegreencreative / laravel-heroku-deploy example snippets


// config/heroku-deploy.php

return [
    // Heroku Platform API token, learn more here:
    // https://devcenter.heroku.com/articles/authentication
    'heroku_token' => env('HEROKU_DEPLOY_HEROKU_TOKEN', null),
    // Cloudflare token, get yours here:
    // https://dash.cloudflare.com/profile/api-tokens
    'cloudflare_token' => env('HEROKU_DEPLOY_CLOUDFLARE_TOKEN', null),
    // Created by Heroku, just capture the information
    'app_name' => env('HEROKU_APP_NAME', null),
    'pr_number' => env('HEROKU_PR_NUMBER', null),
    // JSON array containing information on your zones you want to use for this project
    // {
    //     "mydomain.com": ["id", "account", "support", "policies"]
    // }
    'cloudflare_zones' => json_decode(env('HEROKU_DEPLOY_ZONES', '[]'), true),
    // You can attach addons from other applications
    // {
    //      "addon_id": "confirming_app (id or name)"
    // }
    'heroku_addon_attachments' => json_decode(env('HEROKU_DEPLOY_ADDON_ATTACHMENTS', '[]'), true),
    // Enable automated certificate management in Heroku for each subdomain
    'enable_acm' => env('HEROKU_DEPLOY_ENABLE_ACM', true)
];
shell
php artisan vendor:publish --tag="heroky_deploy_config"
json
{
    "environments": {
        "review": {
            "scripts": {
                "postdeploy": "php artisan heroku:postdeploy",
                "pr-predestroy": "php artisan heroku:pr-predestroy"
            }
        }
    }
}