1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/controllers/ActivityController.php
Hillel Coren f946791780 Bug fixes
2013-12-11 22:33:44 +02:00

17 lines
614 B
PHP
Executable File

<?php
class ActivityController extends \BaseController {
public function getDatatable($clientPublicId)
{
$clientId = Client::getPrivateId($clientPublicId);
return Datatable::collection(Activity::scope()->where('client_id','=',$clientId)->get())
->addColumn('date', function($model) { return Utils::timestampToDateTimeString($model->created_at); })
->addColumn('message', function($model) { return $model->message; })
->addColumn('balance', function($model) { return '$' . $model->balance; })
->orderColumns('date')
->make();
}
}