dev-master
9999999-dev
MIT
The Requires
by Adam Torok
1.1.2
1.1.2.0
MIT
The Requires
by Adam Torok
1.1.1
1.1.1.0
MIT
The Requires
by Adam Torok
1.1
1.1.0.0
MIT
The Requires
by Adam Torok
1.0
1.0.0.0
MIT
The Requires
by Adam Torok
Wallogit.com
2017 © Pedro Peláez
Bootstrap (data) tables
Laravel, (*1)
composer require composer require adamtorok96/bootstrap-table-ajax, (*2)
Into config/app.php put this under providers:
, (*3)
AdamTorok96\BootstrapTableAjax\BootstrapTableAjaxServiceProvider::class,
Into config/app.php put this under aliases:
, (*4)
'AjaxResponse' => AdamTorok96\BootstrapTableAjax\Facades\AjaxResponse::class,
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()
;
}
}
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()
;
}
}
MIT
MIT
MIT
MIT
MIT