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...

631,580,251 9,707
laravel/framework

The Laravel Framework.

580,311,802 34,925
laravel/tinker

Powerful REPL for the Laravel framework.

489,754,436 7,444
laravel/serializable-closure

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

404,034,618 608
nunomaduro/collision

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

384,821,166 4,658