PHP code example of olssonm / deploy

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

    

olssonm / deploy example snippets


'providers' => [
    Olssonm\Deploy\ServiceProvider::class
]

use Olssonm\Deploy\Deploy;

$deploy = new \Olssonm\Deploy\Deploy();
$deploy->make(); // Writes "now" as the deployment time
$deploy->when(); // Retrieves the last deployment time as a Carbon-instance

use Olssonm\Deploy\Deploy;

public function when(Deploy $deploy)
{
    return $deploy->when();
}

app('deploy')->when()->format('Y-m-d'); // App singleton
Deploy::when()->format('Y-m-d'); // Via an alias
bash
$ php artisan deploy:make
// Deployed @ 2017-12-02 09:22:11
json
"scripts": {
    "post-install-cmd": [
        "php artisan deploy:make"
    ]
}