kriptiko / laravel-vue-table
A Laravel package for handling requests from @kritpiko/vue-table component.
v2.3.0
2024-06-11 13:13 UTC
Requires
- php: ^7.2|^7.3|^8.0|^8.1|^8.2
- illuminate/contracts: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/database: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/http: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/support: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
This package is auto-updated.
Last update: 2025-05-11 15:17:30 UTC
README
A Laravel package for handling requests from @kritpiko/vue-table component.
Installation
Add the package to your Laravel app using composer
composer require kriptiko/laravel-vue-table
Usage
Here's an example of a paginated Query Builder result:
use Kriptiko\VueTable\VueTableRequest;
class PostController extends Controller
{
public function index()
{
$vtr = new VueTableRequest(Post::query());
return $vtr->paginated();
}
...
Using withCount
To use withCount, you need to define the relationships after a new VueTableRequest
object is instantiated.
So you usually just need to do something like the following example:
$vtr = new VueTableRequest(User::query());
$vtr->withCount('comments');
$paginator = $vtr->paginated();
License
kriptiko/laravel-vue-table is open-sourced software licensed under the MIT license.
About Kriptiko
Kriptiko is a Creative Studio specialized in web development based in Matosinhos, Portugal.