PHPackages                             karlos3098/laravel-primevue-table-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. karlos3098/laravel-primevue-table-service

ActiveLibrary

karlos3098/laravel-primevue-table-service
=========================================

The Service that facilitates integration with PrimeVue tables by introducing easy pagination, filtering and sorting.

0.0.19(10mo ago)39551[1 issues](https://github.com/karlos1998/laravel-primevue-table-service/issues)MITVue

Since Mar 16Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/karlos1998/laravel-primevue-table-service)[ Packagist](https://packagist.org/packages/karlos3098/laravel-primevue-table-service)[ RSS](/packages/karlos3098-laravel-primevue-table-service/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (15)Used By (0)

Package responsible for pagination and sorting of tables with primeVue on the Laravel + InertiaJs side.
=======================================================================================================

[](#package-responsible-for-pagination-and-sorting-of-tables-with-primevue-on-the-laravel--inertiajs-side)

---

Author: [Let's Code IT - Karol Sójka](https://www.letscode.it/)

[!["Buy Me A Coffee"](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/karlos)

[![image1.png](image1.png)](image1.png)

---

### Installation

[](#installation)

Install the package

```
composer require karlos3098/laravel-primevue-table-service
```

Publish components for vue

```
php artisan vendor:publish --provider="Karlos3098\\LaravelPrimevueTableService\\Providers\\LaravelPrimevueTableServiceProvider"
```

If you need to update the components after a package update, you can use one of these methods:

1. Force publish with the standard tag:

```
php artisan vendor:publish --tag=laravel-primevue-table --force
```

2. Use the dedicated command that always forces overwrite:

```
php artisan primevue-table:publish
```

This dedicated command ensures all assets are updated to the latest version from the package.

Warning

Now the most difficult step, but very important

For our package to work, we need to replace one file from primevue - DataTable.vue This file is different for each version of Vue. We have prepared files for you for the primevue version:

- 3.46.0

Then overwrite the import into the DataTable component in your app.js file using the appropriate version from the list

```
import DataTable from '@/karlos3098/laravel-primevue-table-service/src/Assets/PrimeVue/3.46.0/DataTable.vue';
```

Now you just need to add these 2 main components to your app.js file as well

```
import AdvanceTable from '@advance-table/Components/AdvanceTable.vue';
import AdvanceColumn from '@advance-table/Components/AdvanceColumn.vue';
```

Don't forget to initialize them!

```
app
.component('AdvanceTable', AdvanceTable)
.component('AdvanceColumn', AdvanceColumn)
```

---

It's time to create the first table.
------------------------------------

[](#its-time-to-create-the-first-table)

We recommend using this approach of using services in Laravel. Your file could then look something like this:

```
