Esempio n. 1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $acc = Account::find($id);
     $ledgers = Ledger::where('account_id', $acc->id)->get();
     //dd($ledgers);
     return view('regular.show', compact('ledgers'), compact('acc'));
 }
Esempio n. 2
0
 public function printLedger(Request $request)
 {
     $acc = Account::find($request->id);
     $ledgers = Ledger::where('account_id', $acc->id)->get();
     return \PDF::loadHTML(view('reports.ledger', compact('acc', 'ledgers')))->stream('ledger.pdf');
 }