public function search(Requests\SearchRequest $request) { $term = Input::get('q'); $term = addslashes($term); $queries = Meds::where('name', '=', $term)->firstOrFail(); if (isset($queries)) { $url = $queries->slug; return redirect('/lek/' . $url); } else { return redirect('/'); } }
public function showall() { $medsAll = Meds::Paginate(30); return view('showall', compact('medsAll')); }