for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Laravel Platfourm package.
*
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\Platfourm\Foundation\Console;
use DB;
use Longman\Platfourm\Console\Command;
class DbRestore extends Command
{
/**
* The name and signature of the console command.
* @var string
protected $signature = 'db:restore';
* The console command description.
protected $description = 'Dump restore';
* Execute the console command.
* @return mixed
public function handle()
$path = storage_path('dump.sql');
DB::unprepared(file_get_contents($path));
$this->info('Database backup restored successfully');
}