![]()
WARNING You're browsing the documentation for an upcoming version of Laravel DataTables. The documentation and features of this release are subject to change.
HTML Builder Minified AJAX
The minifiedAjax() method generates a shortened URL for DataTables AJAX requests.
Basic Usage
use Yajra\DataTables\Html\Builder; $html = $builder->minifiedAjax(route('users.data'));
With Custom Data
use Yajra\DataTables\Html\Builder; $html = $builder->minifiedAjax('', null, ['foo' => 'bar']);
With JavaScript Script
use Yajra\DataTables\Html\Builder; $html = $builder->minifiedAjax(route('users.data'), 'd.key = "value";');
How It Works
The minifiedAjax method:
- Generates a short URL hash
- Stores the full AJAX configuration on the server
- Returns the hash as a URL parameter
This is useful for:
- Reducing URL length
- Handling complex data parameters
- Improving security by not exposing parameters in URL
See Also
- HTML Builder AJAX - AJAX configuration
- HTML Builder Post AJAX - POST requests