public static function recordsOf($model, $classOrCallable = null)
    {
        $instance = new static(...self::prepareProperties($model, $classOrCallable));

        $instance->applyFiltersTo();

        $records = $instance->fetchRecords();

        $records = $instance->recordsTransformer->transformRecords($records);

        return $instance->tableData($records);
    }
public static function recordsOf($model, $classOrCallable = null)
    {
        $instance = new static(...self::prepareProperties($model, $classOrCallable));

        $instance->applyFiltersTo();

        $records = $instance->fetchRecords();

        $records = $instance->recordsTransformer->transformRecords($records);

        return $instance->tableData($records);
    }
public static function recordsOf ( $ model , $ classOrCallable = null ) { $ instance = new static ( ... self :: prepareProperties ( $ model , $ classOrCallable ) ) ; $ instance -> applyFiltersTo ( ) ; $ records = $ instance -> fetchRecords ( ) ; $ records = $ instance -> recordsTransformer -> transformRecords ( $ records ) ; return $ instance -> tableData ( $ records ) ; }
Accepts datatables ajax request and returns table data.

@param Model to query for
@param mixed Class/Callable to customize query/data/logic (optional)

@return array Table data
Accepts datatables ajax request and returns table data .