mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进写法
This commit is contained in:
@@ -36,9 +36,8 @@ class Controller
|
||||
}
|
||||
// 前置操作方法
|
||||
// 支持 ['action1','action2'] 或者 ['action1'=>['only'=>'index'],'action2'=>['except'=>'login']]
|
||||
$list = $this->beforeActionList;
|
||||
if ($list) {
|
||||
foreach ($list as $method => $options) {
|
||||
if ($this->beforeActionList) {
|
||||
foreach ($this->beforeActionList as $method => $options) {
|
||||
is_numeric($method) ?
|
||||
$this->beforeAction($options) :
|
||||
$this->beforeAction($method, $options);
|
||||
|
||||
Reference in New Issue
Block a user