thinkPHP5 前置方法不生效
比如
protected $beforeActionList = [
'checkPrimaryScope'=>['only'=>'createOrUpdateAddress']
];
方法上面操作的本意是 在执行createOrUpdateAddress的时候先执行checkPrimaryScope
但是死活没用啊 就是不调用checkPrimaryScope
其他都不用改 $beforeActionList中方法value(键值对)中的方法转换为小写,其他不动(方法的定义不需要改)
protected $beforeActionList = [
'checkPrimaryScope'=>['only'=>'createorupdateaddress']
];