PHP code example of refs / sputnik

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

    

refs / sputnik example snippets


#[Task(name: 'deploy', description: 'Deploy the application', environment: 'container')]
final class DeployTask implements TaskInterface
{
    public function __invoke(TaskContext $ctx): TaskResult
    {
        $ctx->shell('rsync -avz ./dist/ {{ deployPath }}/');
        $ctx->exec(['php', 'artisan', 'migrate', '--force']);

        return TaskResult::success();
    }
}

$ php sputnik.phar deploy

🛰  Sputnik v0.2.0 │ .sputnik.dist.neon │ prod

▸ deploy · Deploy the application

  > rsync -avz ./dist/ /var/www/app/
  > php artisan migrate --force
✓ Done (1.24s)
bash
curl -Lo sputnik.phar https://github.com/refsz/sputnik/releases/latest/download/sputnik.phar
chmod +x sputnik.phar
php sputnik.phar init