Esempio n. 1
0
 public function PrintSprawozdaniaShow($id)
 {
     $deklaracje = Deklaracje::where('sprawozdanie_id', '=', $id)->get()[0];
     $sprawozdanium = Sprawozdanium::findOrFail($id);
     $user = User::where('id', '=', $deklaracje->user_student_id)->get()[0];
     $tematypraktyk = TematyPraktyk::where('id', '=', $deklaracje->tematPraktyki_id)->get()[0];
     $pdf = App::make('dompdf.wrapper');
     $pdf = PDF::loadView('print.sprawozdania.show', compact('deklaracje', 'sprawozdanium', 'user', 'tematypraktyk'));
     return $pdf->stream('download.pdf');
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  *
  * @return Response
  */
 public function show($id)
 {
     $deklaracje = Deklaracje::where('sprawozdanie_id', '=', $id)->get()[0];
     $sprawozdanium = Sprawozdanium::findOrFail($id);
     $user = User::where('id', '=', $deklaracje->user_student_id)->get()[0];
     $tematypraktyk = TematyPraktyk::where('id', '=', $deklaracje->tematPraktyki_id)->get()[0];
     return view('sprawozdania.show', compact('deklaracje', 'sprawozdanium', 'user', 'tematypraktyk'));
 }