Exemplo n.º 1
0
 public function index($step_id, Note $Note, Request $request)
 {
     $step = Step::findOrFail($step_id);
     $notes = $Note->where('registration_step_id', $step->id)->orderBy('id', 'asc');
     if ($request->has('registration_step_id')) {
         // $notes = $notes->where('registration_step_id', request('registration_step_id'));
     }
     $notes = $notes->get();
     if ($request->ajax()) {
         return $notes;
     }
     return view('registration::notes.index', compact('notes', 'step'));
 }