public function countAdvancedSearchData()
    {
        $parameters = [];

        // set advanced search
        $parameters                     = Miscellaneous::dataTableColumnFiltering($this->request, $parameters, 'array');

        // set order table
        $parameters['order']            = json_decode($this->request->input('order'), true);

        // config variables to count n records
        $parametersCount                = $parameters;
        $parametersCount['count']       = true;
        $nFilteredTotal                 = call_user_func($this->model . '::getIndexRecords', $this->request, $parametersCount);

        return response()->json([
            'success'   => true,
            'nRows'     => $nFilteredTotal
        ]);
    }
public function countAdvancedSearchData()
    {
        $parameters = [];

        // set advanced search
        $parameters                     = Miscellaneous::dataTableColumnFiltering($this->request, $parameters, 'array');

        // set order table
        $parameters['order']            = json_decode($this->request->input('order'), true);

        // config variables to count n records
        $parametersCount                = $parameters;
        $parametersCount['count']       = true;
        $nFilteredTotal                 = call_user_func($this->model . '::getIndexRecords', $this->request, $parametersCount);

        return response()->json([
            'success'   => true,
            'nRows'     => $nFilteredTotal
        ]);
    }
public function countAdvancedSearchData ( ) { $ parameters = [ ] ; // set advanced search $ parameters = Miscellaneous :: dataTableColumnFiltering ( $ this -> request , $ parameters , 'array' ) ; // set order table $ parameters [ 'order' ] = json_decode ( $ this -> request -> input ( 'order' ) , true ) ; // config variables to count n records $ parametersCount = $ parameters ; $ parametersCount [ 'count' ] = true ; $ nFilteredTotal = call_user_func ( $ this -> model . '::getIndexRecords' , $ this -> request , $ parametersCount ) ; return response ( ) -> json ( [ 'success' => true , 'nRows' => $ nFilteredTotal ] ) ; }
Function to count results, to prevent export files without data

@return \Illuminate\Http\JsonResponse
Function to count results to prevent export files without data