2016-03-25 01:18:05 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
|
2016-06-22 12:27:41 -07:00
|
|
|
class SystemBackup extends Command
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The console command name.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $name = 'snipeit:backup';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The console command description.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $description = 'This command creates a database dump and zips up all of the uploaded files in the upload directories.';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new command instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute the console command.
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2018-07-25 01:28:44 -07:00
|
|
|
public function handle()
|
2016-06-22 12:27:41 -07:00
|
|
|
{
|
|
|
|
//
|
|
|
|
$this->call('backup:run');
|
|
|
|
|
|
|
|
}
|
2016-03-25 01:18:05 -07:00
|
|
|
}
|