Ignore:
Timestamp:
02/10/24 17:58:54 (9 months ago)
Author:
bube-ristovska <ristovska725@…>
Branches:
main
Children:
92df8cd
Parents:
6dec591
Message:

Bug with embg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Controllers/PeopleController.php

    r6dec591 rd9c4096  
    55use Illuminate\Http\Request;
    66use Illuminate\Support\Facades\DB;
     7use Illuminate\Support\Facades\Session;
    78
    89class PeopleController extends Controller
    910{
    1011    function filter(){
     12        if(Session::get('pe_id') == null) {
     13            return view('login');
     14        }
    1115        $peoples = DB::select('select * from people;');
    1216
     
    1620    }
    1721    function filter_post(){
     22        if(Session::get('pe_id') == null) {
     23            return view('login');
     24        }
    1825        $credentials = request()->validate([
    1926            'embg' => 'required'
     
    2734        ]);
    2835    }
     36    function get_person($embg){
     37        $person = DB::select('SELECT * FROM people WHERE embg=:embg', ['embg' => $embg]);
     38        dd($person);
     39        return view('register-policeman', [
     40            'person' => $person[0]
     41        ]);
     42    }
    2943}
Note: See TracChangeset for help on using the changeset viewer.