0
我有这样的路线:路由与Laravel公共文件夹中的文件4
Route::any("/operations/xml", array("as"=>"operations.xml", "uses"=>"[email protected]"));
我的控制器产生的公共文件夹中保存一个xml:
OperationsController.php:
public function generateXml(){
$doc = new DomDocument("1.0", "UTF-8");
$doc->formatOutput = true;
//I add my stuff inside de xml from the database here...
$doc->save("xml/test.xml");
}
但我需要的是,当我导航到路线http://example.com/operations/xml我将能够下载xml。我怎样才能做到这一点?
完美,谢谢! – 2014-10-07 15:36:46