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-11-29 14:09:21 +02:00

21 lines
566 B
PHP
Executable File

<?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())
->addColumn('date', function($model)
{
return $model->created_at->format('m/d/y h:i a');
})
->addColumn('message', function($model)
{
return $model->message;
})
->orderColumns('date')
->make();
}
}