designbycode/laravel-datatables

This package is the backend implementation for creating datatables for Laravel modal.


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package is the backend implementation for creating datatables for Laravel modal.

Installation

You can install the package via composer:

composer require designbycode/laravel-datatables

You can publish the config file with:

php artisan vendor:publish --tag="datatables-config"

Usage

use Designbycode\Datatables\DataTableController;

class CategoriesDataTable extends DataTableController
{
    public function builder(): Builder
    {
        return Category::query();
    }
    
}

Use with InertiaJs

use Designbycode\Datatables\DataTableController;
use Inertia\Inertia;
use Inertia\Response;

class CategoriesDataTable extends DataTableController
{
    public function builder(): Builder
    {
        return Category::query();
    }
    
    public function index(): Response
    {
        return Inertia::render('Categories', )
    }
    
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.