我有一个严格的root响应xml daha,如下图所示:
Route::get('feed', function() {
$feed = App::make("feed");
$feed->setCache(60, 'feedNewsKey');
if (!$feed->isCached()) {
$news = \DB::table('news')->orderBy('created_at', 'desc')->take(20)->get();
foreach ($news as $post) {
$feed->add($post->title, 'asd', url('detail/' . $post->id), $post->created_at, $post->description, $post->description,['user_id'=>$post->id, 'photo'=>$post->photo]);
}
}
return $feed->render('atom');
});
我想知道如何在blade.php视图文件中迭代这些xlm数据?