80 lines
2.8 KiB
Markdown
80 lines
2.8 KiB
Markdown
# Laravel DataTables Html Plugin.
|
|
|
|
[](http://laravel.com)
|
|
[](https://packagist.org/packages/yajra/laravel-datatables-html)
|
|

|
|
[](https://scrutinizer-ci.com/g/yajra/laravel-datatables-html/?branch=master)
|
|
[](https://packagist.org/packages/yajra/laravel-datatables-html)
|
|
[](https://packagist.org/packages/yajra/laravel-datatables-html)
|
|
|
|
This package is a plugin of [Laravel DataTables](https://github.com/yajra/laravel-datatables) for generating dataTables script using PHP.
|
|
|
|
## Requirements
|
|
|
|
- [Laravel 10.x](https://github.com/laravel/framework)
|
|
- [Laravel DataTables](https://github.com/yajra/laravel-datatables)
|
|
|
|
## Documentations
|
|
|
|
- [Laravel DataTables Documentation](http://yajrabox.com/docs/laravel-datatables)
|
|
- [Demo Application](http://datatables.yajrabox.com) is available for artisan's reference.
|
|
|
|
## Laravel Version Compatibility
|
|
|
|
| Laravel | Package |
|
|
|:--------------|:--------|
|
|
| 8.x and below | 4.x |
|
|
| 9.x | 9.x |
|
|
| 10.x | 10.x |
|
|
|
|
## Quick Installation
|
|
|
|
`composer require yajra/laravel-datatables-html:^10`
|
|
|
|
#### Setup scripts with ViteJS
|
|
|
|
Set the default javascript type to `module` by setting `Builder::useVite()` in the `AppServiceProvider`.
|
|
|
|
```php
|
|
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](https://github.com/yajra/laravel-datatables-html/blob/master/.github/CONTRIBUTING.md) for details.
|
|
|
|
## Security
|
|
|
|
If you discover any security related issues, please email [aqangeles@gmail.com](mailto:aqangeles@gmail.com) instead of using the issue tracker.
|
|
|
|
## Credits
|
|
|
|
- [Arjay Angeles](https://github.com/yajra)
|
|
- [All Contributors](https://github.com/yajra/laravel-datatables-html/graphs/contributors)
|
|
|
|
## License
|
|
|
|
The MIT License (MIT). Please see [License File](https://github.com/yajra/laravel-datatables-html/blob/master/LICENSE.md) for more information.
|