2013-11-29 13:09:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class ActivityController extends \BaseController {
|
|
|
|
|
|
|
|
public function getDatatable($clientId)
|
|
|
|
{
|
|
|
|
return Datatable::collection(Activity::where('account_id','=',Auth::user()->account_id)
|
|
|
|
->where('client_id','=',$clientId)->get())
|
2013-12-01 21:58:25 +01:00
|
|
|
->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')
|
2013-11-29 13:09:21 +01:00
|
|
|
->make();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|