PHP code example of nishtman / repo-backup

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

    

nishtman / repo-backup example snippets


use Illuminate\Support\Facades\Schedule;
use Nishtman\RepoBackup\RepoBackup;

Schedule::command('repo-backup:backup')->daily();
RepoBackup::schedule();
bash
php artisan vendor:publish --tag=repo-backup-config
php artisan vendor:publish --tag=repo-backup-migrations
bash
php artisan migrate
bash
php artisan repo-backup:export --file=repo-backups.json
php artisan repo-backup:import --file=repo-backups.json