adamtorok96/bootstrap-table-ajax
Composer 安装命令:
composer require adamtorok96/bootstrap-table-ajax
包简介
README 文档
README
Links
Bootstrap (data) tables
Laravel
Install
composer require composer require adamtorok96/bootstrap-table-ajax
Into config/app.php put this under providers:
AdamTorok96\BootstrapTableAjax\BootstrapTableAjaxServiceProvider::class,
Into config/app.php put this under aliases:
'AjaxResponse' => AdamTorok96\BootstrapTableAjax\Facades\AjaxResponse::class,
Usage
Example #1
use AdamTorok96\BootstrapTableAjax\AjaxResponse;
class UsersController extends Controller
{
public function index(Request $request)
{
return AjaxResponse::base(User::query(), $request)
->search([
'name',
'email'
])
->orderBy('name')
->get()
;
}
}
Example #2
use AdamTorok96\BootstrapTableAjax\AjaxResponse;
class NewsController extends Controller
{
public function index(Ajax $request)
{
return AjaxResponse::base(News::query(), $request)
->search([
'title',
'author.name'
])
->orderBy('title')
->with([
'author'
])
->withCount([
'comments'
])
->get()
;
}
}
统计信息
- 总下载量: 2.35k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-10