public function pdf()
 {
     /// only admin
     // faltaria para usar de otra forma (Request $request)
     // $tracings=Tracing::filter($request->get('date'),($request->get('state')));
     // para usuar luego con campos de textdomain
     $tracings = Tracing::orderBy('date', 'desc')->get();
     $pdf = PDF::loadView('tracings.pdf', compact('$tracings'));
     return $pdf->stream();
 }
Пример #2
0
 public static function filter($date, $state, $phase)
 {
     return Tracing::date($date)->state($state)->phase($phase)->orderBy('created_at', 'ASC')->paginate(5);
 }
 public function update_tracing(EditTracingRequest $request, $id)
 {
     $id_user = Auth::user()->id;
     $tracings = Tracing::findOrFail($id);
     $tracings->iduser_update->{$id_user};
     $tracings->fill($request->all());
     $tracings->save();
     Session::flash('message', ' Se actualizo exitosamente el seguimiento');
     return redirect()->back();
 }