Ignore:
Timestamp:
06/05/24 13:35:43 (7 months ago)
Author:
bube-ristovska <ristovska725@…>
Branches:
main
Children:
768f473
Parents:
f7acd52
Message:

New feature - details for employee

File:
1 edited

Legend:

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

    rf7acd52 r249bf91  
    2828        ]);
    2929
     30    }
     31    function register_statement(){
     32        return view('register-statement');
     33    }
     34    function register_statement_post()
     35    {
     36       //TODO: so kiki i bojan vodete se po logikata na add policeman
     37    }
     38    function finished_cases(){
     39
     40        if(Session::get('is_policeman')){
     41            $police_station = DB::select('select * from police_station where p_id=:p_id;',['p_id'=>  Session::get('p_id')]);
     42        } else {
     43            $police_station = DB::select('select * from police_station where pe_id=:pe_id;',['pe_id'=>  Session::get('pe_id')]);
     44        }
     45
     46        $cases = DB::select('select * from crime_case where p_id=:p_id and c_status=\'Z\';', ['p_id' => $police_station[0]->p_id]);
     47
     48        return view('archive', [
     49            'cases' => $cases,
     50            'p_address'=>$police_station[0]->p_address
     51        ]);
    3052    }
    3153    function case($wildcard){
Note: See TracChangeset for help on using the changeset viewer.