27 行
625 B
PHP
27 行
625 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Http\Controllers\AuthController;
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class AdminPanelController extends Controller {
|
|
private $objAuth;
|
|
|
|
private $cook;
|
|
private $valid;
|
|
|
|
public function __construct() {
|
|
$this->objAuth = new AuthController();
|
|
$this->cook = (isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : '');
|
|
$this->valid = $this->objAuth->getPermissions($this->cook);
|
|
}
|
|
|
|
public function dashboard () {
|
|
if ($this->valid['blg_addpost'] == 0) return redirect('/');
|
|
return view('pages.admin.dashboard');
|
|
}
|
|
}
|