示例#1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $credits = Credit::join('clients', 'clients.id', '=', 'credits.client_id')->where('credits.account_id', '=', \Auth::user()->account_id)->where('clients.deleted_at', '=', null)->select('credits.public_id', 'clients.name as client_name', 'clients.public_id as client_public_id', 'credits.amount', 'credits.balance', 'credits.credit_date', 'credits.private_notes')->get();
     return View::make('creditos.index', array('credits' => $credits));
 }