From dfbf5456b01bddd092cabbdf922722e9159aa702 Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Mon, 20 Feb 2023 15:32:22 +0800
Subject: [PATCH 01/31] Update installation.md

---
 installation.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/installation.md b/installation.md
index 2db07f1..95e7af2 100644
--- a/installation.md
+++ b/installation.md
@@ -28,7 +28,7 @@ composer require yajra/laravel-datatables-oracle:"^10.0"
 If you are using most of the DataTables plugins like Buttons & Html, you can alternatively use the all-in-one installer package.
 
 ```bash
-composer require yajra/laravel-datatables:^9.0
+composer require yajra/laravel-datatables:^10.0
 ```
 
 <a name="configuration"></a>

From 20aa69eb46ae4cb750b81a878e62f7bb9da78f2e Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Mon, 20 Feb 2023 20:15:28 +0800
Subject: [PATCH 02/31] docs: remove package version

---
 quick-starter.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quick-starter.md b/quick-starter.md
index 7e96d71..fe09e60 100644
--- a/quick-starter.md
+++ b/quick-starter.md
@@ -19,7 +19,7 @@ cd datatables
 composer require laravel/ui --dev
 php artisan ui bootstrap --auth
 
-composer require yajra/laravel-datatables:^9.0
+composer require yajra/laravel-datatables
 ```
 
 For simplicity, you may use SQLite to store your application's data. To instruct Laravel to use SQLite instead of MySQL, update your new application's `.env` file and remove all of the `DB_*` environment variables except for the `DB_CONNECTION` variable, which should be set to `sqlite`:

From 79bda837512eeca782b898572cd911f4ea472324 Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Mon, 20 Feb 2023 23:47:09 +0800
Subject: [PATCH 03/31] docs: laravel 10 + vitejs setup

---
 editor-tutorial.md | 173 +++++++++++++++++++++++++++++----------------
 1 file changed, 113 insertions(+), 60 deletions(-)

diff --git a/editor-tutorial.md b/editor-tutorial.md
index cf453b2..f12d42b 100644
--- a/editor-tutorial.md
+++ b/editor-tutorial.md
@@ -5,11 +5,13 @@ See [DataTables Editor](https://editor.datatables.net/purchase/index) for detail
 
 ## Pre-requisites
 
-This tutorial requires https://yajrabox.com/docs/laravel-datatables/master/quick-starter.
+This tutorial requires https://yajrabox.com/docs/laravel-datatables/10.0/quick-starter.
 
 ## Install DataTables Editor assets.
 
-    yarn add datatables.net-editor datatables.net-editor-bs4 datatables.net-select-bs4
+```sh
+npm i datatables.net-editor datatables.net-editor-bs5
+```
 
 ## Editor License
 
@@ -17,107 +19,158 @@ Copy and rename your `Editor.XX.zip` to `Editor.zip` and move it to project fold
 
 ## Register postinstall script to package.json
 
+```json
     "scripts": {
-        "postinstall": "node ./node_modules/datatables.net-editor/install.js ./Editor.zip",
-        "dev": "npm run development",
-        .....
+        "dev": "vite",
+        "build": "vite build",
+        "postinstall": "node node_modules/datatables.net-editor/install.js ./Editor.zip"
     },
+```
 
-## Register editor script on `resources/js/bootstrap.js`
-
-    try {
-        window.Popper = require('popper.js').default;
-        window.$ = window.jQuery = require('jquery');
+## Register editor script on `resources/js/app.js`
 
-        require('bootstrap');
-        require('datatables.net-bs4');
-        require('datatables.net-buttons-bs4');
-        require('datatables.net-select-bs4');
-        require('datatables.net-editor-bs4');
-    } catch (e) {}
+```js
+import './bootstrap';
+import 'laravel-datatables-vite';
 
+import "datatables.net-editor";
+import Editor from "datatables.net-editor-bs5";
+Editor(window, $);
+```
 
 ## Add editor styles on `resources/sass/app.scss`.
 
-    @import "~datatables.net-select-bs4/css/select.bootstrap4.css";
-    @import "~datatables.net-editor-bs4/css/editor.bootstrap4.css";
-
-## Recompile assets.
+```css
+// Fonts
+@import url('https://fonts.bunny.net/css?family=Nunito');
 
-    yarn
-    yarn watch / dev / prod
+// Variables
+@import 'variables';
 
+// Bootstrap
+@import 'bootstrap/scss/bootstrap';
 
-## Update UsersDataTable and register the Editor buttons.
-
-> Note: CREATE button is in conflict with `buttons.server-side.js`. You need to remove the create button or rename it to something else like `add` button.
-
-    DataTable.ext.buttons.add = {
-        className: 'buttons-add',
+// DataTables
+@import 'bootstrap-icons/font/bootstrap-icons.css';
+@import "datatables.net-bs5/css/dataTables.bootstrap5.css";
+@import "datatables.net-buttons-bs5/css/buttons.bootstrap5.css";
+@import "datatables.net-editor-bs5/css/editor.bootstrap5.css";
+@import 'datatables.net-select-bs5/css/select.bootstrap5.css';
+```
 
-        text: function (dt) {
-            return '<i class="fa fa-plus"></i> ' + dt.i18n('buttons.add', 'Create');
-        },
+## Recompile assets.
 
-        action: function (e, dt, button, config) {
-            window.location = window.location.href.replace(/\/+$/, "") + '/create';
-        }
-    };
+```sh
+npm run dev
+```
 
 ### UsersDataTable.php
 
 Create a new editor instance and add some fields for name and email.
 
 ```php
+namespace App\DataTables;
+
+use App\Models\User;
+use Illuminate\Database\Eloquent\Builder as QueryBuilder;
+use Yajra\DataTables\EloquentDataTable;
+use Yajra\DataTables\Html\Builder as HtmlBuilder;
+use Yajra\DataTables\Html\Button;
+use Yajra\DataTables\Html\Column;
 use Yajra\DataTables\Html\Editor\Editor;
 use Yajra\DataTables\Html\Editor\Fields;
+use Yajra\DataTables\Services\DataTable;
 
-...
+class UsersDataTable extends DataTable
+{
     /**
      * Build DataTable class.
      *
-     * @param mixed $query Results from query() method.
-     * @return \Yajra\DataTables\DataTableAbstract
+     * @param  QueryBuilder  $query  Results from query() method.
+     * @return \Yajra\DataTables\EloquentDataTable
+     */
+    public function dataTable(QueryBuilder $query): EloquentDataTable
+    {
+        return (new EloquentDataTable($query))
+            ->addColumn('action', 'users.action')
+            ->setRowId('id');
+    }
+
+    /**
+     * Get query source of dataTable.
+     *
+     * @param  \App\Models\User  $model
+     * @return \Illuminate\Database\Eloquent\Builder
      */
-    public function dataTable($query)
+    public function query(User $model): QueryBuilder
     {
-        return datatables()
-            ->eloquent($query)
-            ->setRowId('id') // Set the RowID
-            ...
+        return $model->newQuery();
     }
 
-    public function html()
+    /**
+     * Optional method if you want to use html builder.
+     *
+     * @return \Yajra\DataTables\Html\Builder
+     */
+    public function html(): HtmlBuilder
     {
         return $this->builder()
                     ->setTableId('users-table')
                     ->columns($this->getColumns())
                     ->minifiedAjax()
-                    ->dom('Bfrtip')
                     ->orderBy(1)
-                    ->buttons(
+                    ->selectStyleSingle()
+                    ->editors([
+                        Editor::make()
+                              ->fields([
+                                  Fields\Text::make('name'),
+                                  Fields\Text::make('email'),
+                              ]),
+                    ])
+                    ->buttons([
                         Button::make('create')->editor('editor'),
                         Button::make('edit')->editor('editor'),
                         Button::make('remove')->editor('editor'),
-                        Button::make('export'),
+                        Button::make('excel'),
+                        Button::make('csv'),
+                        Button::make('pdf'),
                         Button::make('print'),
                         Button::make('reset'),
-                        Button::make('reload')
-                    )
-                    ->editor(
-                        Editor::make()
-                            ->fields([
-                                Fields\Text::make('name'),
-                                Fields\Text::make('email'),
-                                Fields\Password::make('password'),
-                            ])
-                    );
+                        Button::make('reload'),
+                    ]);
+    }
+
+    /**
+     * Get the dataTable columns definition.
+     *
+     * @return array
+     */
+    public function getColumns(): array
+    {
+        return [
+            Column::make('id'),
+            Column::make('name'),
+            Column::make('email'),
+            Column::make('created_at'),
+            Column::make('updated_at'),
+        ];
+    }
+
+    /**
+     * Get filename for export.
+     *
+     * @return string
+     */
+    protected function filename(): string
+    {
+        return 'Users_'.date('YmdHis');
     }
+}
 ```
 
 ## Create Editor Class to handle CRUD actions.
 
-```
+```sh
 php artisan datatables:editor Users
 ```
 
@@ -125,13 +178,13 @@ php artisan datatables:editor Users
 
 Edit `routes/web.php` and register the store user route.
 
-```
+```php
 Route::post('/users', 'UsersController@store')->name('users.store');
 ```
 
 ## Update users controller
 
-```
+```php
 namespace App\Http\Controllers;
 
 use Illuminate\Http\Request;

From 94bd5300d3d977b0ca885abd98197c14bebdc0dc Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Mon, 20 Feb 2023 23:55:23 +0800
Subject: [PATCH 04/31] fix: route

---
 editor-tutorial.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/editor-tutorial.md b/editor-tutorial.md
index f12d42b..fdcc56b 100644
--- a/editor-tutorial.md
+++ b/editor-tutorial.md
@@ -179,7 +179,8 @@ php artisan datatables:editor Users
 Edit `routes/web.php` and register the store user route.
 
 ```php
-Route::post('/users', 'UsersController@store')->name('users.store');
+Route::get('/users', [App\Http\Controllers\UsersController::class, 'index'])->name('users.index');
+Route::post('/users', [App\Http\Controllers\UsersController::class, 'store'])->name('users.store');
 ```
 
 ## Update users controller

From bfed2fdbdbf920ef0906a9201007fb2b61f3d46b Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Tue, 21 Feb 2023 00:23:30 +0800
Subject: [PATCH 05/31] docs: add postinstall first

---
 editor-tutorial.md | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/editor-tutorial.md b/editor-tutorial.md
index fdcc56b..94d7aad 100644
--- a/editor-tutorial.md
+++ b/editor-tutorial.md
@@ -7,12 +7,6 @@ See [DataTables Editor](https://editor.datatables.net/purchase/index) for detail
 
 This tutorial requires https://yajrabox.com/docs/laravel-datatables/10.0/quick-starter.
 
-## Install DataTables Editor assets.
-
-```sh
-npm i datatables.net-editor datatables.net-editor-bs5
-```
-
 ## Editor License
 
 Copy and rename your `Editor.XX.zip` to `Editor.zip` and move it to project folder.
@@ -27,6 +21,12 @@ Copy and rename your `Editor.XX.zip` to `Editor.zip` and move it to project fold
     },
 ```
 
+## Install DataTables Editor assets.
+
+```sh
+npm i datatables.net-editor datatables.net-editor-bs5
+```
+
 ## Register editor script on `resources/js/app.js`
 
 ```js

From 944538f984a439f5f2b503ddd41231c3770c84be Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Tue, 21 Feb 2023 00:25:08 +0800
Subject: [PATCH 06/31] docs: shorter title

---
 editor-tutorial.md | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/editor-tutorial.md b/editor-tutorial.md
index 94d7aad..caff59b 100644
--- a/editor-tutorial.md
+++ b/editor-tutorial.md
@@ -1,4 +1,4 @@
-# Creating a Laravel Full CRUD with DataTables Editor.
+# Laravel 10 CRUD with DataTables Editor.
 
 Before we begin, please be reminded that the Editor library that we are going to use here requires a paid license.
 See [DataTables Editor](https://editor.datatables.net/purchase/index) for details.
@@ -91,9 +91,7 @@ class UsersDataTable extends DataTable
      */
     public function dataTable(QueryBuilder $query): EloquentDataTable
     {
-        return (new EloquentDataTable($query))
-            ->addColumn('action', 'users.action')
-            ->setRowId('id');
+        return (new EloquentDataTable($query))->setRowId('id');
     }
 
     /**

From a65a0b63fb4c2bab34a13ac3a3024eed6e20d6ce Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Tue, 21 Feb 2023 12:29:00 +0800
Subject: [PATCH 07/31] docs: laravel 9 & 10 install docs

---
 installation.md | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/installation.md b/installation.md
index 95e7af2..83c15e8 100644
--- a/installation.md
+++ b/installation.md
@@ -11,7 +11,7 @@
 <a name="requirements"></a>
 ### Requirements
 
-- [Laravel 9+](https://github.com/laravel/framework)
+- [Laravel 9|10](https://github.com/laravel/framework)
 - [jQuery DataTables v1.10.x](http://datatables.net/)
 
 <a name="installing-laravel-datatables"></a>
@@ -21,6 +21,14 @@ Laravel DataTables can be installed with [Composer](http://getcomposer.org/doc/0
 
 Run the following command in your project to get the latest version of the package:
 
+#### Laravel 9
+
+```bash
+composer require yajra/laravel-datatables-oracle:"^9.0"
+```
+
+#### Laravel 10
+
 ```bash
 composer require yajra/laravel-datatables-oracle:"^10.0"
 ```

From 39150e363c354df30161c214661e09473592380d Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Tue, 21 Feb 2023 12:30:18 +0800
Subject: [PATCH 08/31] docs: fix installer

---
 installation.md | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/installation.md b/installation.md
index 83c15e8..e24f5c0 100644
--- a/installation.md
+++ b/installation.md
@@ -21,19 +21,19 @@ Laravel DataTables can be installed with [Composer](http://getcomposer.org/doc/0
 
 Run the following command in your project to get the latest version of the package:
 
-#### Laravel 9
-
 ```bash
-composer require yajra/laravel-datatables-oracle:"^9.0"
+composer require yajra/laravel-datatables-oracle:"^10.0"
 ```
 
-#### Laravel 10
+If you are using most of the DataTables plugins like Buttons & Html, you can alternatively use the all-in-one installer package.
+
+#### Laravel 9
 
 ```bash
-composer require yajra/laravel-datatables-oracle:"^10.0"
+composer require yajra/laravel-datatables:"^9.0"
 ```
 
-If you are using most of the DataTables plugins like Buttons & Html, you can alternatively use the all-in-one installer package.
+#### Laravel 10
 
 ```bash
 composer require yajra/laravel-datatables:^10.0

From 0519c597676f846286f5d43bdaf1f0ea7faf60c9 Mon Sep 17 00:00:00 2001
From: raulmainlab <123628611+raulmainlab@users.noreply.github.com>
Date: Wed, 1 Mar 2023 10:43:59 +0100
Subject: [PATCH 09/31] Update html-builder-column-builder.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

questa è la proposta giusta per rendere eseguibile il codice da html builder Column Builder
---
 html-builder-column-builder.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/html-builder-column-builder.md b/html-builder-column-builder.md
index b523cb0..d7df80a 100644
--- a/html-builder-column-builder.md
+++ b/html-builder-column-builder.md
@@ -30,7 +30,7 @@ $column = Column::make('id')
         ->title('Id')
         ->searchable(true)
         ->orderable(true)
-        ->render('function(){}')
+       ->render('\'<div class="editor-attiva" >\' + (full[\'deleted_at\'] == null ? \'<i class="fas fa-check-circle client-is-active"></i>Attivo\' : \'<i class="fas fa-times-circle"></i>Disattivo\') + \'</div>\';\'\'' )
         ->footer('Id')
         ->exportable(true)
         ->printable(true);

From 13a0599349ce70f0619f5c95feeeec859652209a Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Thu, 16 Mar 2023 10:43:44 +0800
Subject: [PATCH 10/31] docs: Builder::useVite() helper

---
 quick-starter.md | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/quick-starter.md b/quick-starter.md
index fe09e60..15b1c7b 100644
--- a/quick-starter.md
+++ b/quick-starter.md
@@ -196,6 +196,34 @@ use App\Http\Controllers\UsersController;
 Route::get('/users', [UsersController::class, 'index'])->name('users.index');
 ```
 
+### Use ViteJs / script type defaults to module
+
+You can also set DataTable to use vitejs by default by registering `Builder::useVite()` inside the `AppServiceProvider`.
+
+```php
+namespace App\Providers;
+
+use Illuminate\Support\ServiceProvider;
+use Yajra\DataTables\Html\Builder;
+
+class AppServiceProvider extends ServiceProvider
+{
+    public function boot(): void
+    {
+        Builder::useVite();
+    }
+}
+```
+
+Upon registering, you can now use scripts and without the need to set the type to module.
+
+```php
+@push('scripts')
+    {{ $dataTable->scripts() }}
+@endpush
+```
+
+
 <a name="update-default-layout"></a>
 ## <b>05.</b> Update the default app layout
 

From 04f0bc23547a86b6f72369297a6be18cb1ba36f8 Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Tue, 21 Mar 2023 09:43:33 +0800
Subject: [PATCH 11/31] docs: use latest version constraint

fix: https://github.com/yajra/laravel-datatables/issues/2969
---
 installation.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/installation.md b/installation.md
index e24f5c0..992bbba 100644
--- a/installation.md
+++ b/installation.md
@@ -22,7 +22,7 @@ Laravel DataTables can be installed with [Composer](http://getcomposer.org/doc/0
 Run the following command in your project to get the latest version of the package:
 
 ```bash
-composer require yajra/laravel-datatables-oracle:"^10.0"
+composer require yajra/laravel-datatables-oracle:"^10.3.1"
 ```
 
 If you are using most of the DataTables plugins like Buttons & Html, you can alternatively use the all-in-one installer package.

From f2adb9ee84178c563fc6a8725d3483b2287b3ef7 Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Fri, 24 Mar 2023 11:39:31 +0800
Subject: [PATCH 12/31] docs: add actions property type

fix https://github.com/yajra/laravel-datatables/issues/2973
---
 buttons-custom.md | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/buttons-custom.md b/buttons-custom.md
index 0f178ca..714faec 100644
--- a/buttons-custom.md
+++ b/buttons-custom.md
@@ -15,15 +15,17 @@ use Yajra\DataTables\Services\DataTable;
 
 class UsersDataTable extends DataTable
 {
-    protected $actions = ['print', 'excel', 'myCustomAction'];
+    protected array $actions = ['print', 'excel', 'myCustomAction'];
 
     public function html()
     {
         return $this->builder()
                     ->columns($this->getColumns())
-                    ->parameters([
-                        'dom'          => 'Bfrtip',
-                        'buttons'      => ['print', 'excel', 'myCustomAction'],
+                    ->dom('Bfrtip')
+                    ->buttons([
+                        'print',
+                        'excel',
+                        'myCustomAction',
                     ]);
     }
 

From 6a1823d54132935fabd1af8ac0d0047e73ef246d Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Wed, 29 Mar 2023 13:10:57 +0800
Subject: [PATCH 13/31] docs: update generated service class

---
 buttons-console.md | 155 ++++++++++++++-------------------------------
 1 file changed, 46 insertions(+), 109 deletions(-)

diff --git a/buttons-console.md b/buttons-console.md
index 0efc0fc..478ffcc 100644
--- a/buttons-console.md
+++ b/buttons-console.md
@@ -23,72 +23,84 @@ This will create a `PostsDataTable` class in the `app\DataTables` directory.
 ```php
 namespace App\DataTables;
 
-use App\User;
+use App\Models\Post;
+use Illuminate\Database\Eloquent\Builder as QueryBuilder;
+use Yajra\DataTables\EloquentDataTable;
+use Yajra\DataTables\Html\Builder as HtmlBuilder;
+use Yajra\DataTables\Html\Button;
+use Yajra\DataTables\Html\Column;
+use Yajra\DataTables\Html\Editor\Editor;
+use Yajra\DataTables\Html\Editor\Fields;
 use Yajra\DataTables\Services\DataTable;
 
 class PostsDataTable extends DataTable
 {
     /**
-     * Build DataTable class.
+     * Build the DataTable class.
      *
-     * @return \Yajra\DataTables\DataTableAbstract
+     * @param QueryBuilder $query Results from query() method.
      */
-    public function dataTable()
+    public function dataTable(QueryBuilder $query): EloquentDataTable
     {
-        return $this->datatables
-            ->eloquent($this->query())
-            ->addColumn('action', 'path.to.action.view');
+        return (new EloquentDataTable($query))
+            ->addColumn('action', 'posts.action')
+            ->setRowId('id');
     }
 
     /**
-     * Get the query object to be processed by dataTables.
-     *
-     * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Support\Collection
+     * Get the query source of dataTable.
      */
-    public function query()
+    public function query(Post $model): QueryBuilder
     {
-        $query = User::query();
-
-        return $this->applyScopes($query);
+        return $model->newQuery();
     }
 
     /**
-     * Optional method if you want to use html builder.
-     *
-     * @return \Yajra\DataTables\Html\Builder
+     * Optional method if you want to use the html builder.
      */
-    public function html()
+    public function html(): HtmlBuilder
     {
         return $this->builder()
+                    ->setTableId('posts-table')
                     ->columns($this->getColumns())
-                    ->ajax('')
-                    ->addAction(['width' => '80px'])
-                    ->parameters($this->getBuilderParameters());
+                    ->minifiedAjax()
+                    //->dom('Bfrtip')
+                    ->orderBy(1)
+                    ->selectStyleSingle()
+                    ->buttons([
+                        Button::make('excel'),
+                        Button::make('csv'),
+                        Button::make('pdf'),
+                        Button::make('print'),
+                        Button::make('reset'),
+                        Button::make('reload')
+                    ]);
     }
 
     /**
-     * Get columns.
-     *
-     * @return array
+     * Get the dataTable columns definition.
      */
-    protected function getColumns()
+    public function getColumns(): array
     {
         return [
-            'id',
-            // add your columns
-            'created_at',
-            'updated_at',
+            Column::computed('action')
+                  ->exportable(false)
+                  ->printable(false)
+                  ->width(60)
+                  ->addClass('text-center'),
+            Column::make('id'),
+            Column::make('add your columns'),
+            Column::make('created_at'),
+            Column::make('updated_at'),
         ];
     }
 
     /**
-     * Get filename for export.
-     *
-     * @return string
+     * Get the filename for export.
      */
-    protected function filename()
+    protected function filename(): string
     {
-        return 'posts_' . time();
+        return 'Posts_' . date('YmdHis');
     }
 }
 ```
@@ -104,81 +116,6 @@ php artisan datatables:make Posts --model
 This will generate an `App\DataTables\PostsDataTable` class that uses `App\Post` as the base model for our query. 
 The exported filename will also be set to `posts_(timestamp)`.
 
-```php
-<?php
-
-namespace App\DataTables;
-
-use App\Post;
-use Yajra\DataTables\Services\DataTable;
-
-class PostsDataTable extends DataTable
-{
-    /**
-     * Build DataTable class.
-     *
-     * @return \Yajra\DataTables\DataTableAbstract
-     */
-    public function dataTable()
-    {
-        return $this->datatables
-            ->eloquent($this->query())
-            ->addColumn('action', 'path.to.action.view');
-    }
-
-    /**
-     * Get the query object to be processed by dataTables.
-     *
-     * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Support\Collection
-     */
-    public function query()
-    {
-        $query = Post::query();
-
-        return $this->applyScopes($query);
-    }
-
-    /**
-     * Optional method if you want to use html builder.
-     *
-     * @return \Yajra\DataTables\Html\Builder
-     */
-    public function html()
-    {
-        return $this->builder()
-                    ->columns($this->getColumns())
-                    ->ajax('')
-                    ->addAction(['width' => '80px'])
-                    ->parameters($this->getBuilderParameters());
-    }
-
-    /**
-     * Get columns.
-     *
-     * @return array
-     */
-    protected function getColumns()
-    {
-        return [
-            'id',
-            // add your columns
-            'created_at',
-            'updated_at',
-        ];
-    }
-
-    /**
-     * Get filename for export.
-     *
-     * @return string
-     */
-    protected function filename()
-    {
-        return 'posts_' . time();
-    }
-}
-```
-
 
 ### Model Namespace Option
 

From bd93c8d28bdfa2156ba0c5809e3b6f1838ed3453 Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Sat, 15 Apr 2023 08:32:10 +0800
Subject: [PATCH 14/31] chore: use English

---
 html-builder-column-builder.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/html-builder-column-builder.md b/html-builder-column-builder.md
index d7df80a..1f1fd6e 100644
--- a/html-builder-column-builder.md
+++ b/html-builder-column-builder.md
@@ -30,7 +30,7 @@ $column = Column::make('id')
         ->title('Id')
         ->searchable(true)
         ->orderable(true)
-       ->render('\'<div class="editor-attiva" >\' + (full[\'deleted_at\'] == null ? \'<i class="fas fa-check-circle client-is-active"></i>Attivo\' : \'<i class="fas fa-times-circle"></i>Disattivo\') + \'</div>\';\'\'' )
+        ->render('\'<div class="editor-active" >\' + (full[\'deleted_at\'] == null ? \'<i class="fas fa-check-circle client-is-active"></i>Active\' : \'<i class="fas fa-times-circle"></i>Inactive\') + \'</div>\';\'\'' )
         ->footer('Id')
         ->exportable(true)
         ->printable(true);

From a54b46964b81489bd6d4d18b10854b62f3003509 Mon Sep 17 00:00:00 2001
From: Mohammad Reza Golestan <mreza_golestan@live.com>
Date: Sun, 7 May 2023 12:22:14 +0330
Subject: [PATCH 15/31] add exportRender how to use to document (this method
 added on commit d48dc1bbe8bc860070240d6f1444e7a861c53789 to be used for
 render column for print or export as we expected)

---
 html-builder-column-builder.md | 1 +
 html-builder-column.md         | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/html-builder-column-builder.md b/html-builder-column-builder.md
index 1f1fd6e..2aba799 100644
--- a/html-builder-column-builder.md
+++ b/html-builder-column-builder.md
@@ -31,6 +31,7 @@ $column = Column::make('id')
         ->searchable(true)
         ->orderable(true)
         ->render('\'<div class="editor-active" >\' + (full[\'deleted_at\'] == null ? \'<i class="fas fa-check-circle client-is-active"></i>Active\' : \'<i class="fas fa-times-circle"></i>Inactive\') + \'</div>\';\'\'' )
+        ->render(function($row,$data){return $data == 1 ? 'Active' : 'Inactive'})
         ->footer('Id')
         ->exportable(true)
         ->printable(true);
diff --git a/html-builder-column.md b/html-builder-column.md
index ab21bf4..f0a2b03 100644
--- a/html-builder-column.md
+++ b/html-builder-column.md
@@ -47,6 +47,10 @@ Orderable attribute will toggle the `ordering` ability for the defined column. D
 ### Render (Optional)
 Render attribute is a `js` script string that you can use to modify the way the column is being rendered via `javascript`.
 
+### Export Render (Optional)
+Export Render attribute is a `php callback function` that you can use to modify the way the column is being rendered via `print` or `export (CSV/Excel/PDF)`.
+
+
 ### Footer (Optional)
 Footer attribute will be as your `tables` column's `footer` content `<tfoot></tfoot>`.
 

From 4241867c5c27fa5706a17c4ecfd48ba7fa878581 Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Wed, 10 May 2023 14:26:10 +0800
Subject: [PATCH 16/31] docs: controller to dataTable class

---
 buttons-extended.md | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/buttons-extended.md b/buttons-extended.md
index 2811a86..3753c44 100644
--- a/buttons-extended.md
+++ b/buttons-extended.md
@@ -4,8 +4,8 @@ We can now extend and reuse our DataTable class inside our controller by using `
 
 > IMPORTANT: Extended DataTable is only applicable on `^1.1` and above.
 
-
 ## Upgrading from v1.0 to v1.1
+
 - Upgrade to `laravel-datatables-buttons:^1.1`
 - Rename `ajax()` method to `dataTable()`
 - Remove `->toJson()` from the method chain.
@@ -33,6 +33,7 @@ TO
 ```
 
 ## Quick Example:
+
 ```php
 Route::get('datatable', function(RolesDataTable $dataTable){
    return $dataTable->before(function (\Yajra\DataTables\DataTableAbstract $dataTable) {
@@ -54,3 +55,19 @@ Route::get('datatable', function(RolesDataTable $dataTable){
    ->render('path.to.view');
 });
 ```
+
+## Passing data to DataTable class
+
+You can pass data from Controller to DataTable class using `with` api.
+
+```php
+Route::get('datatable', function(RolesDataTable $dataTable){
+   return $dataTable
+       ->with('key', 'value')
+       ->with([
+        'key2' => 'value2',
+        'key3' => 'value3',
+       ])
+       ->render('path.to.view');
+});
+```

From 183760b2eba76e07576ca8b7679314ab439dd22d Mon Sep 17 00:00:00 2001
From: Meshack Junior <meshackf1@gmail.com>
Date: Sat, 24 Jun 2023 21:02:48 +0300
Subject: [PATCH 17/31] Update releases.md

---
 releases.md | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/releases.md b/releases.md
index f12c3a7..e09cc8a 100644
--- a/releases.md
+++ b/releases.md
@@ -1,18 +1,18 @@
 # Release Notes
 
-- [Laravel DataTables 7.0](#7.0)
+- [Laravel DataTables 10.0](#10.0)
 
-<a name="7.0"></a>
-## Laravel DataTables 7.0
+<a name="10.0"></a>
+## Laravel DataTables 10.0
 
-Laravel DataTables 7.0 splits Laravel DataTables 6.x into a main package and plugins packages for more flexibile and pluggable design.
+Laravel DataTables 10.0 splits Laravel DataTables 6.x into a main package and plugins packages for more flexibile and pluggable design.
 
 ### Buttons Plugin
-On Laravel DataTables 7.0, service classes and files are extracted into a separate package to reduce its complexity and dependencies on other packages by default.
+On Laravel DataTables 10.0, service classes and files are extracted into a separate package to reduce its complexity and dependencies on other packages by default.
 This idea comes up from [Issue #832](https://github.com/yajra/{{package}}/issues/832) which actually makes sense since not all users are using the export functionality.
 
 ### DomPDF
-`DomPDF` dependency is now optional on Laravel DataTables 7.0 and was transferred to Buttons plugin.
+`DomPDF` dependency is now optional on Laravel DataTables 10.0 and was transferred to Buttons plugin.
 And the `Buttons` plugin will now give you a choice to install it or not.
 This was as a `suggest` since we now have an option to use [`snappy`](https://github.com/barryvdh/laravel-snappy) as our pdf generator.
 

From b3b0dbf1e8d79f5366fc1e96e6d383cc0116da8a Mon Sep 17 00:00:00 2001
From: Mathieu FERRE <github@arkhas.fr>
Date: Fri, 30 Jun 2023 16:50:49 +0200
Subject: [PATCH 18/31] Update edit-column.md

---
 edit-column.md | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/edit-column.md b/edit-column.md
index d778e78..2cf9542 100644
--- a/edit-column.md
+++ b/edit-column.md
@@ -55,3 +55,28 @@ Then create your view on `resources/views/users/datatables/name.blade.php`.
 ```php
 Hi {{ $name }}!
 ```
+
+
+<a name="selected-column"></a>
+## Edit only the requested Columns
+
+> {tip} You can skip editing the columns that are not in your requested payload by using `editOnlySelectedColumns` before using `editColumn`
+
+```php
+use DataTables;
+
+Route::get('user-data', function() {
+	$model = App\User::query();
+
+	return DataTables::eloquent($model)
+                ->editColumn('id', function () {
+                    return view('users.datatables.id'); // View will always be rendered
+                })
+                ->editOnlySelectedColumns()
+                ->editColumn('name', function () {
+                    return 'Hi ' . $user->name . '!'; // View will only be rendered if the column is in the payload
+                               only if in the payload
+                })
+                ->toJson();
+});
+```

From 39cd19626d28a5998fd50b127aa9e4b5469c1d48 Mon Sep 17 00:00:00 2001
From: Mohammad Reza Golestan <mreza_golestan@live.com>
Date: Mon, 31 Jul 2023 15:00:57 +0330
Subject: [PATCH 19/31] add exportRender

---
 html-builder-column-builder.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/html-builder-column-builder.md b/html-builder-column-builder.md
index 2aba799..ddaff77 100644
--- a/html-builder-column-builder.md
+++ b/html-builder-column-builder.md
@@ -31,7 +31,7 @@ $column = Column::make('id')
         ->searchable(true)
         ->orderable(true)
         ->render('\'<div class="editor-active" >\' + (full[\'deleted_at\'] == null ? \'<i class="fas fa-check-circle client-is-active"></i>Active\' : \'<i class="fas fa-times-circle"></i>Inactive\') + \'</div>\';\'\'' )
-        ->render(function($row,$data){return $data == 1 ? 'Active' : 'Inactive'})
+        ->exportRender(function($row,$data){return $data == 1 ? 'Active' : 'Inactive'})
         ->footer('Id')
         ->exportable(true)
         ->printable(true);

From d975b4b520ab1bb54e00f070f3f141dea44d0f4b Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Wed, 13 Sep 2023 09:28:57 +0800
Subject: [PATCH 20/31] fix: cs

---
 search-panes-starter.md | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/search-panes-starter.md b/search-panes-starter.md
index c363b22..25499f1 100644
--- a/search-panes-starter.md
+++ b/search-panes-starter.md
@@ -106,10 +106,7 @@ public function dataTable($query) : Yajra\DataTables\DataTableAbstract
              * values are always given in an array even if just one is selected
              */
             function (\Illuminate\Database\Eloquent\Builder $query, array $values) {
-                return $query
-                    ->whereIn(
-                        'id',
-                        $values);
+                return $query->whereIn('id', $values);
             }
         );
 }

From 3c51868fffe5f8d2de7478b917bcb75fcef4bcc6 Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Thu, 21 Sep 2023 11:39:29 +0800
Subject: [PATCH 21/31] bump to v10

---
 html-installation.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/html-installation.md b/html-installation.md
index 507ce61..f616b7e 100644
--- a/html-installation.md
+++ b/html-installation.md
@@ -6,7 +6,7 @@ Github: https://github.com/yajra/laravel-datatables-html
 
 Run the following command in your project to get the latest version of the plugin:
 
-`composer require yajra/laravel-datatables-html:^9.0`
+`composer require yajra/laravel-datatables-html:^10.0`
 
 ## Configuration
 

From c00d775ec30aa937e345419f6658fb22cfb628a8 Mon Sep 17 00:00:00 2001
From: Ozan Kurt <me@ozankurt.com>
Date: Fri, 29 Sep 2023 09:42:49 +0200
Subject: [PATCH 22/31] Update edit-column.md

---
 edit-column.md | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/edit-column.md b/edit-column.md
index 2cf9542..022cfb7 100644
--- a/edit-column.md
+++ b/edit-column.md
@@ -46,16 +46,48 @@ Route::get('user-data', function() {
 	$model = App\User::query();
 
 	return DataTables::eloquent($model)
-				->editColumn('name', 'users.datatables.into')
+				->editColumn('name', 'users.datatables.name')
 				->toJson();
+	
 });
 ```
 
 Then create your view on `resources/views/users/datatables/name.blade.php`.
+
 ```php
 Hi {{ $name }}!
 ```
 
+<a name="view-with-data"></a>
+## Edit Column with View and Data
+
+> {tip} You can use view to render your added column by passing the view path as the second argument on `editColumn` api.
+
+```php
+use DataTables;
+
+Route::get('user-data', function() {
+	$model = App\User::query();
+
+	$externalData = 'External';
+
+	return DataTables::eloquent($model)
+				->editColumn('name', ['users.datatables.name', [
+					'externalData' => $externalData,
+				]])
+				->toJson();
+	
+});
+```
+
+Then create your view on `resources/views/users/datatables/name.blade.php`.
+
+```php
+Hi {{ $name }}!
+
+Here is some external data: {{ $externalData }}.
+```
+
 
 <a name="selected-column"></a>
 ## Edit only the requested Columns

From d6bf8e202dc9cee65ae4c0cac760c55aa3f930e8 Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Fri, 29 Sep 2023 23:18:55 -0700
Subject: [PATCH 23/31] fix: searchPanes column def

---
 search-panes-starter.md | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/search-panes-starter.md b/search-panes-starter.md
index 25499f1..2ad85a9 100644
--- a/search-panes-starter.md
+++ b/search-panes-starter.md
@@ -25,11 +25,27 @@ public function html() : \Yajra\DataTables\Html\Builder
     // Setting the dom string directly
     return $this->builder()
         ->searchPanes(SearchPane::make())
+        ->addColumnDef([
+            'targets' => '_all',
+            'searchPanes' => [
+                'show' => true,
+                'vieTotal' => false,
+                'viewCount' => false,
+            ],
+        ])
         ->dom('PBfrtip');
     
     // Alternatively set the dom with parameters
     return $this->builder()
         ->searchPanes(SearchPane::make())
+        ->addColumnDef([
+            'targets' => '_all',
+            'searchPanes' => [
+                'show' => true,
+                'vieTotal' => false,
+                'viewCount' => false,
+            ],
+        ])
         ->parameters([
             'dom' => 'PBfrtip'
         ]);
@@ -47,6 +63,14 @@ public function html() : \Yajra\DataTables\Html\Builder
     // Adding via class
     return $this->builder()
         ->searchPanes(SearchPane::make())
+        ->addColumnDef([
+            'targets' => '_all',
+            'searchPanes' => [
+                'show' => true,
+                'vieTotal' => false,
+                'viewCount' => false,
+            ],
+        ])
         ->buttons([
             \Yajra\DataTables\Html\Button::make('searchPanes')
             // other buttons...
@@ -55,6 +79,14 @@ public function html() : \Yajra\DataTables\Html\Builder
     // Alternatively set the buttons with options
     return $this->builder()
         ->searchPanes(SearchPane::make())
+        ->addColumnDef([
+            'targets' => '_all',
+            'searchPanes' => [
+                'show' => true,
+                'vieTotal' => false,
+                'viewCount' => false,
+            ],
+        ])
         ->parameters([
             'buttons' => ['searchPanes', /*other buttons...*/]
         ]);

From 2f70c3cf4b56186386c918498e311b6d7a6bbbfb Mon Sep 17 00:00:00 2001
From: Arjay Angeles <aqangeles@gmail.com>
Date: Fri, 29 Sep 2023 23:21:08 -0700
Subject: [PATCH 24/31] docs: add docs to display specific column index

---
 search-panes-starter.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/search-panes-starter.md b/search-panes-starter.md
index 2ad85a9..7204f16 100644
--- a/search-panes-starter.md
+++ b/search-panes-starter.md
@@ -34,6 +34,19 @@ public function html() : \Yajra\DataTables\Html\Builder
             ],
         ])
         ->dom('PBfrtip');
+
+    // Displaying specific column indexes
+    return $this->builder()
+        ->searchPanes(SearchPane::make()->columns([1, 2]))
+        ->addColumnDef([
+            'targets' => '_all',
+            'searchPanes' => [
+                'show' => true,
+                'vieTotal' => false,
+                'viewCount' => false,
+            ],
+        ])
+        ->dom('PBfrtip');
     
     // Alternatively set the dom with parameters
     return $this->builder()

From e4f8c8849a9f6053b8adbebd25e8719b1b47977e Mon Sep 17 00:00:00 2001
From: jaydons <44308248+jaydons@users.noreply.github.com>
Date: Mon, 2 Oct 2023 03:46:27 -0700
Subject: [PATCH 25/31] docs: columnDef must used when using buttons

---
 search-panes-starter.md | 2 --
 1 file changed, 2 deletions(-)

diff --git a/search-panes-starter.md b/search-panes-starter.md
index 7204f16..394aa88 100644
--- a/search-panes-starter.md
+++ b/search-panes-starter.md
@@ -75,7 +75,6 @@ public function html() : \Yajra\DataTables\Html\Builder
 {
     // Adding via class
     return $this->builder()
-        ->searchPanes(SearchPane::make())
         ->addColumnDef([
             'targets' => '_all',
             'searchPanes' => [
@@ -91,7 +90,6 @@ public function html() : \Yajra\DataTables\Html\Builder
     
     // Alternatively set the buttons with options
     return $this->builder()
-        ->searchPanes(SearchPane::make())
         ->addColumnDef([
             'targets' => '_all',
             'searchPanes' => [

From e05fbe2ec418c71823087286ad1ed654b27b32b5 Mon Sep 17 00:00:00 2001
From: jaydons <44308248+jaydons@users.noreply.github.com>
Date: Mon, 2 Oct 2023 03:47:31 -0700
Subject: [PATCH 26/31] docs: add collapse option

---
 search-panes-options.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/search-panes-options.md b/search-panes-options.md
index 4026db4..438be85 100644
--- a/search-panes-options.md
+++ b/search-panes-options.md
@@ -18,6 +18,7 @@ public function html() : \Yajra\DataTables\Html\Builder
                         // SearchPane::make()...
                     ]
                 )
+                ->collapse(false)
                 ->dtOpts( // Sets the options for the datatables inside the searchpanes
                     [
                         'paging' => true, 

From b6cc3f247617afe931cb09499bfb37a7fd42039c Mon Sep 17 00:00:00 2001
From: jaydons <44308248+jaydons@users.noreply.github.com>
Date: Mon, 2 Oct 2023 03:50:55 -0700
Subject: [PATCH 27/31] docs: initCollapsed option

ref: https://github.com/yajra/laravel-datatables-html/pull/207
---
 search-panes-options.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/search-panes-options.md b/search-panes-options.md
index 438be85..206a41b 100644
--- a/search-panes-options.md
+++ b/search-panes-options.md
@@ -18,6 +18,7 @@ public function html() : \Yajra\DataTables\Html\Builder
                         // SearchPane::make()...
                     ]
                 )
+                ->initCollapsed(true)
                 ->collapse(false)
                 ->dtOpts( // Sets the options for the datatables inside the searchpanes
                     [

From 3f3825e60588593f72c83cd4697e5a39f6e21737 Mon Sep 17 00:00:00 2001
From: jaydons <44308248+jaydons@users.noreply.github.com>
Date: Mon, 2 Oct 2023 03:54:35 -0700
Subject: [PATCH 28/31] docs: show option

---
 search-panes-options.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/search-panes-options.md b/search-panes-options.md
index 206a41b..c65cd5b 100644
--- a/search-panes-options.md
+++ b/search-panes-options.md
@@ -18,6 +18,7 @@ public function html() : \Yajra\DataTables\Html\Builder
                         // SearchPane::make()...
                     ]
                 )
+                ->show(false)
                 ->initCollapsed(true)
                 ->collapse(false)
                 ->dtOpts( // Sets the options for the datatables inside the searchpanes

From 78ae1c86e149f4f370e82967f43656dc568fdd5c Mon Sep 17 00:00:00 2001
From: Furkan Akkoc <furkan.akkoc@fatech.dev>
Date: Tue, 7 Nov 2023 20:18:15 +0100
Subject: [PATCH 29/31] Add scout search

---
 documentation.md |  1 +
 scout-search.md  | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 scout-search.md

diff --git a/documentation.md b/documentation.md
index 14788f5..82ea2b4 100644
--- a/documentation.md
+++ b/documentation.md
@@ -53,6 +53,7 @@
 	- [Smart Search](/docs/{{package}}/{{version}}/smart-search)
 	- [Starts With Search](/docs/{{package}}/{{version}}/starts-with-search)
 	- [Relationships](/docs/{{package}}/{{version}}/relationships)
+	- [Scout Search](/docs/{{package}}/{{version}}/scout-search)
 
 - ## Sorting/Ordering
 	- [Manual Order](/docs/{{package}}/{{version}}/manual-order)
diff --git a/scout-search.md b/scout-search.md
new file mode 100644
index 0000000..5df30bb
--- /dev/null
+++ b/scout-search.md
@@ -0,0 +1,56 @@
+# Scout Search
+
+**Note:** This documentation is applicable from version 10.11.0 and upwards, where external search engines can be integrated with Laravel Scout, replacing the built-in search functionality.
+
+Scout Search provides a fallback mechanism, so the built-in search will be used if any issues occur with the external search engines (e.g., server problems or indexing problems).
+
+Supported drivers: Meilisearch, Algolia
+
+<a name="setup"></a>
+
+## Setup
+
+To start using Scout Search, you need to install and configure <a href="https://laravel.com/docs/10.x/scout#installation">Laravel Scout</a> with your preferred driver.
+
+Once Laravel Scout is set up, you can enable Scout Search in your `dataTable` function like this:
+
+```php
+return (new EloquentDataTable($query))
+    // Enable scout search for eloquent model
+    ->enableScoutSearch(Product::class)
+    
+    // Add filters to scout search
+    ->scoutFilter(function (string $keyword) {
+        return 'region IN ["Germany", "France"]'; // Meilisearch
+        // or
+        return 'region:Germany OR region:France'; // Algolia
+    })
+    
+    // Add filters to default search
+    ->filter(function (QueryBuilder $query, bool $scout_searched) {
+        if (!$scout_searched)
+        {
+            // Filter already added for scout search
+            $query->whereIn('region', ['Germany', 'France']);
+        }
+
+        // Stock is not indexed so it has to be filtered after the initial scout search
+        $query->where('stock', '>', 50);
+    }, true);
+```
+
+<a name="additional-js"></a>
+
+## Additional JS script
+
+To control the visibility of sort icons on the frontend table, you'll need an additional JavaScript script. This script hides the sort icons when Scout Search is successful (indicating fixed ordering by search relevance) and shows them again when the search keyword is removed.
+
+If you are using the `laravel-datatables-html` package, you can easily include the script in your `html` function:
+
+```php
+return $this->builder()
+    ->setTableId('products-table')
+    ->addScript('datatables::scout');
+```
+
+Alternatively, you can manually fetch and include the JavaScript script into your own code from this file: <a href="https://github.com/yajra/laravel-datatables-html/blob/master/src/resources/views/scout.blade.php">resources/views/scout.blade.php</a>

From fd97eaa9092d07197b79f80497ee0a0ddb02c109 Mon Sep 17 00:00:00 2001
From: Furkan Akkoc <furkan.akkoc@fatech.dev>
Date: Tue, 7 Nov 2023 20:28:54 +0100
Subject: [PATCH 30/31] Add html additional js scripts

---
 documentation.md                   |  1 +
 html-builder-additional-scripts.md | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 html-builder-additional-scripts.md

diff --git a/documentation.md b/documentation.md
index 82ea2b4..5397f22 100644
--- a/documentation.md
+++ b/documentation.md
@@ -93,6 +93,7 @@
     - [Add Action](/docs/{{package}}/{{version}}/html-builder-action)
     - [Add Checkbox](/docs/{{package}}/{{version}}/html-builder-checkbox)
     - [Add Index](/docs/{{package}}/{{version}}/html-builder-index)
+    - [Additional Scripts](/docs/{{package}}/{{version}}/html-builder-additional-scripts)
     - [Github](https://github.com/yajra/laravel-datatables-html)
 
 - ## Buttons
diff --git a/html-builder-additional-scripts.md b/html-builder-additional-scripts.md
new file mode 100644
index 0000000..c8a4dc1
--- /dev/null
+++ b/html-builder-additional-scripts.md
@@ -0,0 +1,24 @@
+# Additional JavaScript Scripts
+
+## General Usage
+
+Starting with v10.10.0, you can easily add additional JavaScript scripts as blade views in your `html` function like this:
+
+```php
+return $this->builder()
+    ->addScript('your.view.name');
+```
+
+## Built-in Additional Scripts
+
+### Scout Search
+
+**View:** `datatables::scout`
+
+Control visibility of sort icons on the frontend table. Hide sort icons when Scout Search is successful (indicating fixed ordering by search relevance) and show them again when the search keyword is removed.
+
+### Batch Remove Optimization
+
+**View:** `datatables::functions.batch_remove`
+
+Delete all unnecessary information before sending `remove` requests (Editor), keeping only the `DT_RowId`. Otherwise, batch remove requests may fail because of server limits.

From 1ae225603eed270821005d3ccdd58113cc5e402c Mon Sep 17 00:00:00 2001
From: Alpha Olomi <alphaolomi@gmail.com>
Date: Wed, 6 Mar 2024 14:22:02 +0300
Subject: [PATCH 31/31] Add Article Community link

---
 community-links.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/community-links.md b/community-links.md
index 601f8b5..2f28828 100644
--- a/community-links.md
+++ b/community-links.md
@@ -6,6 +6,7 @@ You may use the links below to further understand the Laravel Datatables.
 ## Articles
 - [Laravel Datatables Tutorial With Example](https://appdividend.com/2018/04/16/laravel-datatables-tutorial-with-example/)
 - [How to implement DataTables server-side in laravel](https://medium.com/justlaravel/how-to-implement-datatables-server-side-in-laravel-bcacf8472d70)
+- [How to get started with DataTables in Laravel](https://dev.to/alphaolomi/how-to-get-started-with-datatables-in-laravel-9-5c39)
 
 <a name="videos"></a>
 ## Videos
