/** * Display a listing of the resource. * * @return \Illuminate\Contracts\Http\Response */ public function index() { return json()->setMeta($this->meta)->withPagination($this->model->with('books')->latest()->paginate(5), new AuthorTransformer()); }