1. Go to this page and download the library: Download stekel/laravel-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/ */
stekel / laravel-deploy example snippets
namespace App;
use stekel\LaravelDeploy\Site;
class SampleSite extends Site
{
public function prod()
{
$this->ssh('192.168.1.100, admin, password, function ($connection) {
$connection->command('git reset --hard');
$connection->command('git pull');
$connection->command('composer install --optimize-autoloader --no-dev');
$connection->command('php artisan migrate');
$connection->command('php artisan cache:clear');
$connection->command('php artisan config:cache');
$connection->command('php artisan route:cache');
$connection->command('php artisan view:cache');
});
}
}