Giter Club home page Giter Club logo

spock-datatables's Introduction

Spock DataTables

A laravel package to handle the server side processing of DataTables jQuery Plugin via AJAX option by using Eloquent Query Builder.

LICENSE.md LICENSE.md LICENSE.md LICENSE.md

Requirements

  • PHP >= 7.0
  • Laravel >= 5.5
  • jQuery Datatables v1.10x

Quick Installation

$ composer require fluidtech/spock-datatables

Add service provider

Register provider on you conifg\app.php file.

'providers' => [
    ...,
    \FluidTech\SpockDataTables\SpockServiceProvider::class
]

And that's it! Now you can start building out DataTables faster!

Documentation

  1. Using Eloquent Query Builder

    Fetches the and returns the records using the given query.

    Syntax

       $expectedResponse = \FluidTech\SpockDataTables\DataTable::of($query, $list_of_columns)
           ->make();
    • Accepts
      • $query : The base query from which records needs to be fetched.
      • $list_of_columns : An list of column names that needs to be displayed.
        Note : The sequence of columns should be the same as specified on the client side.

    Example

    $query = DB::table('users');
    
    return \FluidTech\SpockDataTables\DataTable::of($query, [
            "name", 
            "phone_number"
        ])
        ->make();
  2. Using Fluent Query Builder (Coming Soon)

  3. Using Collection (Coming Soon)

License

The MIT License (MIT). Please see License File for more information.

spock-datatables's People

Contributors

gaurav-punjabi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

makhijagaurav

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.