Skip to content

yajra/laravel-datatables-html

Repository files navigation

Laravel DataTables Html Plugin

Laravel 12.xLatest Stable VersionScrutinizer Code QualityTotal DownloadsLicense

Continuous IntegrationStatic AnalysisPHP Linting

This package is a plugin of Laravel DataTables for generating dataTables script using PHP.

Requirements

Documentations

Laravel Version Compatibility

LaravelPackage
8.x and below4.x
9.x9.x
10.x10.x
11.x11.x
12.x12.x

Quick Installation

composer require yajra/laravel-datatables-html:^12

Setup scripts with ViteJS

Set the default javascript type to module by setting Builder::useVite() in the AppServiceProvider.

namespace App\Providers;

use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider;
use Yajra\DataTables\Html\Builder;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        Paginator::useBootstrapFive();
        Builder::useVite();
    }
}

Publish Assets (Optional)

$ php artisan vendor:publish --tag=datatables-html

And that's it! Start building out some awesome DataTables!

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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