PHP code example of znmin / laravel-deployer

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

    

znmin / laravel-deployer example snippets


// config/app.php

'providers' => [
    //...
    Znmin\LaravelDeployer\ServiceProvider::class,
],

/*
|--------------------------------------------------------------------------
| 默认部署驱动
|--------------------------------------------------------------------------
|
| 指定默认的部署驱动
| 可选择的驱动:expect
|
*/
'default' => 'expect',

'drives' => [

    /*
     * expect 驱动配置
     */
    'expect' => [
        'username' => env('DEPLOY_EXPECT_USERNAME', ''),
        'password' => env('DEPLOY_EXPECT_PASSWORD', ''),
        'branch' => env('DEPLOY_EXPECT_BRANCH', 'master'),
        'remote' => 'origin',
    ],
],
shell
$ php artisan vendor:publish --provider=Znmin\LaravelDeployer\ServiceProvider