laravel-dynamic-response maintained by prageeth-peiris
Description
A Simple Package that converts Laravel Query Builder result in to DataTables , Charts, CSV etc.
Author
Last update
2022/05/19 13:13
(dev-master)
License
Downloads
276
Installation
You can install the package via composer:
composer require prageeth-peiris/laravel-dynamic-response
Usage
in your controller use LaravelDynamicResponseFacade
class myController extends Controller{
public function all(){
$builderObject = Post::where('author','test')->select('*');
return LaravelDynamicResponseFacade::send($builderObject);
}
}
And in the request you must specify responseFormat query parameter example : http://test.local?responseFormat=table
Supported Formats :
- table
- csv
Testing
composer test
Dependencies
- PHP 8.1
- Laravel 8
- https://spatie.be/docs/laravel-data/v1/introduction
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email glpspeiris@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.