public function results($modelName)
    {
        $dataTable = app('admin_datatable');

        //get the sort options and filters
        $page        = $this->request->input('page', 1);
        $sortOptions = $this->request->input('sortOptions', array());
        $filters     = $this->request->input('filters', array());

        //return the rows
        return response()->json($dataTable->getRows(app('db'), $filters, $page, $sortOptions));
    }
public function results($modelName)
    {
        $dataTable = app('admin_datatable');

        //get the sort options and filters
        $page        = $this->request->input('page', 1);
        $sortOptions = $this->request->input('sortOptions', array());
        $filters     = $this->request->input('filters', array());

        //return the rows
        return response()->json($dataTable->getRows(app('db'), $filters, $page, $sortOptions));
    }
public function results ( $ modelName ) { $ dataTable = app ( 'admin_datatable' ) ; //get the sort options and filters $ page = $ this -> request -> input ( 'page' , 1 ) ; $ sortOptions = $ this -> request -> input ( 'sortOptions' , array ( ) ) ; $ filters = $ this -> request -> input ( 'filters' , array ( ) ) ; //return the rows return response ( ) -> json ( $ dataTable -> getRows ( app ( 'db' ) , $ filters , $ page , $ sortOptions ) ) ; }
Gets the database results for the current model.

@param string $modelName

@return array of rows
Gets the database results for the current model .