Skip to content

Commit fea3d1b

Browse files
committed
Merge pull request bgultekin#82 from Jacq/master
Minor changes to provide raw output
2 parents e069517 + 05e9239 commit fea3d1b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/Bllim/Datatables/Datatables.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function of($query)
5858
*
5959
* @return null
6060
*/
61-
public function make($mDataSupport=false)
61+
public function make($mDataSupport=false,$raw=false)
6262
{
6363
$this->mDataSupport = $mDataSupport;
6464
$this->create_last_columns();
@@ -67,7 +67,7 @@ public function make($mDataSupport=false)
6767
$this->init_columns();
6868
$this->regulate_array();
6969

70-
return $this->output();
70+
return $this->output($raw);
7171
}
7272

7373
/**
@@ -508,7 +508,7 @@ private function getColumnName($str)
508508
*
509509
* @return null
510510
*/
511-
private function output()
511+
private function output($raw=false)
512512
{
513513
$sColumns = array_merge_recursive($this->columns,$this->sColumns);
514514

@@ -523,6 +523,11 @@ private function output()
523523
if(Config::get('app.debug', false)) {
524524
$output['aQueries'] = DB::getQueryLog();
525525
}
526-
return Response::json($output);
526+
if($raw) {
527+
return $output;
528+
}
529+
else {
530+
return Response::json($output);
531+
}
527532
}
528533
}

0 commit comments

Comments
 (0)