app/Http/Controllers/PostsController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $posts = Post::orderBy('title', 'desc')->paginate(5);
        return view('posts.index')->with('posts', $posts);
    }
public function index ( ) { $ posts = Post :: orderBy ( 'title' , 'desc' ) -> paginate ( 5 ) ; return view ( 'posts.index' ) -> with ( 'posts' , $ posts ) ; }
Display a listing of the resource.
Display a listing of the resource .
//6