ratiw / vue-table

data table simplify! -- vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination component.
MIT License
1.83k stars 303 forks source link

how to use transformer in vuetable #108

Open yantaosh opened 7 years ago

yantaosh commented 7 years ago

I want to transformer data in vuetable this is my code but it doesn't work

$devis = Devis::paginate(20);
return $this->respondWithItem($devis,new DevisTransformer());
ratiw commented 7 years ago

@a119347 This has nothing to do with vuetable at all. It's Laravel's code on the serve side.

yantaosh commented 7 years ago

The json data:

{ data: [], meta: { pagination: { total: 163, count: 15, per_page: 15, current_page: 2, total_pages: 11, has_more: true } } }

my code pagination-path="meta.pagination" it doesn't work how to set the pagination-path

ratiw commented 7 years ago

@a119347 You have already set the pagination-path correctly. However, the pagination information is not correct. See here