$peoples ]); } function filter_post(){ if(Session::get('pe_id') == null) { return view('login'); } $credentials = request()->validate([ 'embg' => 'required' ]); $embg = $credentials['embg']; $peoples = DB::select('SELECT * FROM people WHERE embg ~ :embg', ['embg' => '^' . $embg]); return view('filter', [ 'peoples' => $peoples ]); } function get_person($embg){ $person = DB::select('SELECT * FROM people WHERE embg=:embg', ['embg' => $embg]); dd($person); return view('register-policeman', [ 'person' => $person[0] ]); } }