Automation init...2
This commit is contained in:
parent
6b273f0551
commit
1973a55bfb
@ -3,12 +3,17 @@
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Trait\AuthTrait;
|
||||
|
||||
abstract class CommonController extends BaseController
|
||||
{
|
||||
use AuthTrait;
|
||||
private $_datas = [];
|
||||
|
||||
protected function __construct() {}
|
||||
protected function __construct()
|
||||
{
|
||||
$this->_datas['session'] = $this->login_check();
|
||||
}
|
||||
|
||||
final public function __get($name): array|null
|
||||
{
|
||||
|
||||
@ -4,14 +4,11 @@ namespace App\Controllers\Mangboard\Admin;
|
||||
|
||||
use App\Controllers\CommonController;
|
||||
use App\Models\Mangboard\UserModel;
|
||||
use App\Trait\AuthTrait;
|
||||
|
||||
class UserController extends CommonController
|
||||
{
|
||||
use AuthTrait;
|
||||
public function __construct()
|
||||
{
|
||||
$this->_datas['session'] = $this->login_check();
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user