KyPHP在application/behavior 下的SetTheme.php类中重新设置了视图基础路径:
namespace app\behavior;
use think\facade\View;
class SetTheme
{
public function run()
{
$root_path = env('root_path');
$model = request()->module();
$view_path = $root_path . 'themes/pc/' . $model . '/';
View::config('view_path', $view_path);
}
}在该大目录下,各页面仍然遵循thinkphp中的视图文件调取规则: module/controller/action 。
关于视图的更多内容,请细看 : https://www.kancloud.cn/manual/thinkphp5_1/354064