<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use DB;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
	function pass_value($value)
	{
		echo $value;
	}
	public function backupdatabaseCtrl()
	{
		return view('backupmanager');
	}
	public function downloaddatabase()
	{
		$data['mysqlUserName']      = "root";
		$data['mysqlPassword']      = "";
		$data['mysqlHostName']      = "localhost";
		$data['DbName']      		= DB::connection()->getDatabaseName();
		$data['backup_name']        = date("Y-m-d H-i-s")."webdesk-mosquedesk.sql";
		$data['tables']             = "Your tables";
		return view('downloaddatabase',compact('data'));
	}
}
