Easy Laravel Server-Side implementation of PrimeVue Datatables
tasdildiren/primevue-datatables is a Laravel package for easy laravel server-side implementation of primevue datatables.
It currently has 0 GitHub stars and 10 downloads on Packagist (latest version v1.0.0).
Install it with composer require tasdildiren/primevue-datatables.
Discover more Laravel packages by tasdildiren
or browse all Laravel packages to compare alternatives.
Last updated
This is a simple, clean and fluent serve-side implementation of PrimeVue Datatables in Laravel.

author.user.nameno. or records per page settingYou can install the package via composer:
composer require tasdildiren/primevue-datatables
It is as simple as having this in your index() function of your controller:
public function index(Request $request): JsonResponse
{
$list = PrimevueDatatables::of(Book::query())->make();
return response()->json($list);
}
The server-side implementation uses two parameters from your laravel request object to perform filtering, sorting and pagination: You have to pass the following parameters as query params from the client:
searchable_columns) - Used to specify the columns that will be used to perform the global datatable searchdt_params) - This is the main Datatable event object as received from PrimeVue. See Lazy Datatable documentation for more detailsGo through PrimeVue's Lazy Datatable documentation for details on frontend implementation.
Here is an example of your loadLazyData() implementation:
const loadLazyData = async () => {
loading.value = true;
try {
const res = await axios.post('/api/books',{
dt_params: lazyParams.value,
searchable_columns: ['title','author.name','price'],
});
records.value = res.data.data;
totalRecords.value = res.data.total;
loading.value = false;
} catch (e) {
records.value = [];
totalRecords.value = 0;
loading.value = false;
}
};
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.