Skip to content

Minor changes to provide raw output #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/Bllim/Datatables/Datatables.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function of($query)
*
* @return null
*/
public function make($mDataSupport=false)
public function make($mDataSupport=false,$raw=false)
{
$this->mDataSupport = $mDataSupport;
$this->create_last_columns();
Expand All @@ -67,7 +67,7 @@ public function make($mDataSupport=false)
$this->init_columns();
$this->regulate_array();

return $this->output();
return $this->output($raw);
}

/**
Expand Down Expand Up @@ -508,7 +508,7 @@ private function getColumnName($str)
*
* @return null
*/
private function output()
private function output($raw=false)
{
$sColumns = array_merge_recursive($this->columns,$this->sColumns);

Expand All @@ -523,6 +523,11 @@ private function output()
if(Config::get('app.debug', false)) {
$output['aQueries'] = DB::getQueryLog();
}
return Response::json($output);
if($raw) {
return $output;
}
else {
return Response::json($output);
}
}
}