PHP code example of backup-gerente / laravel

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

    

backup-gerente / laravel example snippets


// FOR LARAVEL 5.5 +
BackupManager\Laravel\Laravel55ServiceProvider::class,

php artisan vendor:publish --provider="BackupManager\Laravel\Laravel55ServiceProvider"

// FOR LUMEN 5.5 AND ABOVE
$app->configure('backup-manager');
$app->register(BackupManager\Laravel\Lumen55ServiceProvider::class);

use BackupManager\Manager;

public function __construct(Manager $manager) {
    $this->manager = $manager;
}

$manager = App::make(\BackupManager\Manager::class);

/**
 * Define the application's command schedule.
 *
 * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
 * @return void
 */
 protected function schedule(Schedule $schedule) {
     $environment = config('app.env');
     $schedule->command(
         "db:backup --database=mysql --destination=s3 --destinationPath=/{$environment}/projectname --timestamp="Y_m_d_H_i_s" --compression=gzip"
         )->twiceDaily(13,21);
 }