Skip to content

Instantly share code, notes, and snippets.

@samvaughton
Created December 17, 2013 21:50
Show Gist options
  • Save samvaughton/8013202 to your computer and use it in GitHub Desktop.
Save samvaughton/8013202 to your computer and use it in GitHub Desktop.
Preview
<?php
$query = DB::table('customers');
$dth = new DataTable(\Input::all(), $query, array(
new Column("id", array(
'process' => function($columnData, $rowData) {
return "#{$columnData}";
}
)),
new Column("name"),
new Column("email_address"),
new Column("phone_mobile"),
new Column("actions", array(
'type' => 'static',
'process' => function($columnData, $rowData) {
return sprintf("<a href='#edit-%s'>Edit</a>", $rowData['id']);
}
)),
));
echo $dth->process(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment