/** * Display a listing of posts. * * @return \Illuminate\Http\Response */ public function index() { $posts = Post::getLatest(10); return view('flashtag::posts.index', compact('posts')); }
/** * Display the default page. * * @return \Illuminate\Http\Response */ public function index() { $posts = Post::getLatest(10); $categories = Category::all(); return view('flashtag::home', compact('posts', 'categories')); }