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

        //get the inputted rows and the model rows
        $rows = (int) $this->request->input('rows', 20);
        $dataTable->setRowsPerPage(app('session.store'), 0, $rows);

        return response()->JSON(array('success' => true));
    }
public function rowsPerPage($modelName)
    {
        $dataTable = app('admin_datatable');

        //get the inputted rows and the model rows
        $rows = (int) $this->request->input('rows', 20);
        $dataTable->setRowsPerPage(app('session.store'), 0, $rows);

        return response()->JSON(array('success' => true));
    }
public function rowsPerPage ( $ modelName ) { $ dataTable = app ( 'admin_datatable' ) ; //get the inputted rows and the model rows $ rows = ( int ) $ this -> request -> input ( 'rows' , 20 ) ; $ dataTable -> setRowsPerPage ( app ( 'session.store' ) , 0 , $ rows ) ; return response ( ) -> JSON ( array ( 'success' => true ) ) ; }
The POST method for setting a user's rows per page.

@param string $modelName

@return JSON
The POST method for setting a user s rows per page .