laravel 生成html

暂无标签
$string = view('index', ['lists'=>$lists]);
file_put_contents("index.html", $string);

此为生成到public目录,文件名index.html