/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $prc = Dentist::where('prc', 'LIKE', '%' . $id . '%'); $name = Dentist::where('name', 'LIKE', '%' . $id . '%'); $dents = Dentist::where('id', '=', $id)->union($prc)->union($name)->simplePaginate($this->recPerPage); return view('libraries.dentists.index', ['dents' => $dents, 'pageTitle' => 'ODRMS - Dentists']); }