app/Controllers/Http/PostController.js
/**
   * Show a list of all posts.
   * GET posts
   */
Show a list of all posts.
GET posts
Show a list of all posts . GET posts
async index ({ request, response, view }) {
    const posts = Post.query()
      .with('user')
      .fetch()
    return posts
  }
async index ( { request , response , view } ) { const posts = Post . query ( ) . with ( 'user' ) . fetch ( ) return posts }
Show a list of all posts.
Show a list of all posts .