<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Webprofile\Posts;
class RssFeedController extends Controller
{
    public function feed()
    {
        $setting = webprofilesetting();
        $posts = Posts::where('post_status', 't')->
        orderBy('created_at', 'desc')->
        limit(10)->get();
        return response()->view('rss.feed', compact('posts','setting'))->header('Content-Type', 'application/xml');
    }
}