protected function prepareContent(ActivityLogs $datatable, array $data)
    {
        $collection = $datatable->query()->get();
        $return     = [];
        foreach ($collection as $log) {
            $element = [];
            foreach ($data as $key => $method) {
                if (method_exists($datatable, $method)) {

                    $called = call_user_func($datatable->{$method}(), $log);
                    $value  = is_object($called) ? $called->__toString() : $called;
                } else {
                    $value = $log->{$key};
                }
                array_push($element, strip_tags($value));
            }
            array_push($return, implode(self::separator, $element));
        }
        return $return;
    }
protected function prepareContent(ActivityLogs $datatable, array $data)
    {
        $collection = $datatable->query()->get();
        $return     = [];
        foreach ($collection as $log) {
            $element = [];
            foreach ($data as $key => $method) {
                if (method_exists($datatable, $method)) {

                    $called = call_user_func($datatable->{$method}(), $log);
                    $value  = is_object($called) ? $called->__toString() : $called;
                } else {
                    $value = $log->{$key};
                }
                array_push($element, strip_tags($value));
            }
            array_push($return, implode(self::separator, $element));
        }
        return $return;
    }
protected function prepareContent ( ActivityLogs $ datatable , array $ data ) { $ collection = $ datatable -> query ( ) -> get ( ) ; $ return = [ ] ; foreach ( $ collection as $ log ) { $ element = [ ] ; foreach ( $ data as $ key => $ method ) { if ( method_exists ( $ datatable , $ method ) ) { $ called = call_user_func ( $ datatable -> { $ method } ( ) , $ log ) ; $ value = is_object ( $ called ) ? $ called -> __toString ( ) : $ called ; } else { $ value = $ log -> { $ key } ; } array_push ( $ element , strip_tags ( $ value ) ) ; } array_push ( $ return , implode ( self :: separator , $ element ) ) ; } return $ return ; }
Prepares content for csv

@param ActivityLogs $datatable
@param array $data
@return array
Prepares content for csv