Created
December 17, 2013 21:50
-
-
Save samvaughton/8013202 to your computer and use it in GitHub Desktop.
Preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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