PHP code example of safegrd / laravel
1. Go to this page and download the library: Download safegrd/laravel 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/ */
safegrd / laravel example snippets
use Illuminate\Support\Facades\Event;
use SafeGrd\Laravel\Events\BackupFailed;
Event::listen(function (BackupFailed $e) {
// $e->command, $e->surface, $e->exitCode, $e->message, $e->output (the last lines)
});
bash
php artisan safegrd:list
php artisan safegrd:cli -- restore --snapshot <id> --target env:TARGET_URL --target-dir /tmp/app-restored