1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/controllers/ActivityController.php
2013-12-03 19:32:33 +02:00

15 lines
535 B
PHP
Executable File

<?php
class ActivityController extends \BaseController {
public function getDatatable($clientId)
{
return Datatable::collection(Activity::scope()->where('client_id','=',$clientId)->get())
->addColumn('date', function($model) { return $model->created_at->format('m/d/y h:i a'); })
->addColumn('message', function($model) { return $model->message; })
->addColumn('balance', function($model) { return '$' . $model->balance; })
->orderColumns('date')
->make();
}
}