Skip to content

Commit

Permalink
docs: usage with vitejs
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra committed Feb 20, 2023
1 parent 72bc6d8 commit c38e8cf
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,29 @@ This package is a plugin of [Laravel DataTables](https://github.com/yajra/larave

`composer require yajra/laravel-datatables-html:^10`

#### Service Provider (Optional on Laravel 5.5+)

`Yajra\DataTables\HtmlServiceProvider::class`
#### 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)

Expand Down

0 comments on commit c38e8cf

Please sign in to comment.