adamtorok96/bootstrap-table-ajax

2,348
Install
composer require adamtorok96/bootstrap-table-ajax
Latest Version:1.1.2
PHP:>=7.0
License:MIT
Last Updated:Mar 23, 2018
Links: GitHub  ·  Packagist
Maintainer: edems96

Bootstrap Table Ajax for Laravel 5

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()
        ;
    }
}

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
1.1.2 >=7.0 ^5.4 MIT
1.1.1 >=7.0 ^5.4 MIT
1.1 >=7.0 ^5.4 MIT
1.0 >=7.0 ^5.4 MIT