mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 21:52:35 +01:00
17 lines
614 B
PHP
Executable File
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();
|
|
}
|
|
|
|
} |