channel([ 'title' => Setting::get('app_name'), 'description' => 'Status Feed', 'link' => Setting::get('app_domain'), ]); Incident::get()->map(function ($incident) use ($feed) { if ($incident->component) { $componentName = $incident->component->name; } else { $componentName = null; } $feed->item([ 'title' => $incident->name, 'message' => $incident->message, 'component' => $componentName, 'status' => $incident->humanStatus, 'created_at' => $incident->created_at, 'updated_at' => $incident->updated_at, ]); }); return Response::make($feed, 200, ['Content-Type' => 'text/xml']); } }