23.11 Upload to live
This commit is contained in:
parent
8cae2f92a4
commit
8ebdacec98
80 changed files with 7320 additions and 3937 deletions
87
app/Http/Controllers/Sys/AdminToolsController.php
Executable file
87
app/Http/Controllers/Sys/AdminToolsController.php
Executable file
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Sys;
|
||||
|
||||
|
||||
|
||||
use App\Http\Controllers\Api\KasController;
|
||||
use App\Http\Controllers\Api\KasSLLController;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\UserShop;
|
||||
use Auth;
|
||||
use Input;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
class AdminToolsController extends Controller
|
||||
{
|
||||
protected $userRepo;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('sysadmin');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
dd('index');
|
||||
}
|
||||
|
||||
public function domainSSL()
|
||||
{
|
||||
|
||||
$user_shops = UserShop::all();
|
||||
$text = "";
|
||||
|
||||
$kas = new KasController();
|
||||
$domain = 'mivita.care';
|
||||
|
||||
$ssl = KasSLLController::getApiSSLParameter();
|
||||
|
||||
$subdomains = $kas->action('get_subdomains');
|
||||
foreach ($subdomains as $subdomain){
|
||||
$text .= $subdomain['subdomain_name']." - ".$subdomain['ssl_certificate_sni']."\n";
|
||||
|
||||
if($subdomain['ssl_certificate_sni'] != "Y"){
|
||||
$pra = array(
|
||||
'hostname' => $subdomain['subdomain_name'],
|
||||
);
|
||||
$pra = array_merge($pra, $ssl);
|
||||
$value = $kas->action('update_ssl', $pra);
|
||||
$text .= $value."\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
$data = [
|
||||
'values' => $user_shops,
|
||||
'text' => $text,
|
||||
];
|
||||
|
||||
return view('sys.admin.index', $data);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
|
||||
*/
|
||||
public function domainSSLStore()
|
||||
{
|
||||
$data = Input::all();
|
||||
|
||||
\Session()->flash('alert-save', true);
|
||||
return back();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue