/** * Show the application welcome screen to the user. * * @return Response */ public function index() { $data = array('data' => \App\Posts::paginate(5)); return view('welcome')->with($data); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $posts = Posts::paginate(10); return view('admin.posts.index')->with('posts', $posts); }