Automation init...2

This commit is contained in:
최준흠 2024-09-09 11:28:48 +09:00
parent 6b273f0551
commit 1973a55bfb
2 changed files with 6 additions and 4 deletions

View File

@ -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
{

View File

@ -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();
}