mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Response类的redirect方法 Controller类的前置操作定义改进
This commit is contained in:
@@ -56,10 +56,16 @@ class Controller
|
||||
protected function beforeAction($method, $options = [])
|
||||
{
|
||||
if (isset($options['only'])) {
|
||||
if (is_string($options['only'])) {
|
||||
$options['only'] = explode(',', $options['only']);
|
||||
}
|
||||
if (!in_array(ACTION_NAME, $options['only'])) {
|
||||
return;
|
||||
}
|
||||
} elseif (isset($options['except'])) {
|
||||
if (is_string($options['except'])) {
|
||||
$options['except'] = explode(',', $options['except']);
|
||||
}
|
||||
if (in_array(ACTION_NAME, $options['except'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user