有些时候我们需要获取渲染后的html
内容:
$view = view('user.info')->with('data', $data);
$htmlContent = response($view)->getContent();
Thinkphp3.2
中也有类似的方法:
$this->assign('data', $data);
$htmlContent = $this->fetch('user:info');
有些时候我们需要获取渲染后的html
内容:
$view = view('user.info')->with('data', $data);
$htmlContent = response($view)->getContent();
Thinkphp3.2
中也有类似的方法:
$this->assign('data', $data);
$htmlContent = $this->fetch('user:info');