update app/BaseController.php.
增加_ajax=1,_pajax=1伪装功能。 Signed-off-by: liveup <kingf_c@foxmail.com>
This commit is contained in:
@@ -235,7 +235,8 @@ class BaseController
|
||||
*/
|
||||
protected function getResponseType(): string
|
||||
{
|
||||
return request()->isAjax() || request()->acceptJson() ? 'json' : 'html';
|
||||
$mask=request()->input('_ajax')==1 ||request()->input('_pjax')==1;
|
||||
return request()->isAjax() || request()->acceptJson() || $mask ? 'json' : 'html';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user