Changeset 2bd3041 for app/Http/Controllers
- Timestamp:
- 02/16/24 12:49:16 (10 months ago)
- Branches:
- main
- Children:
- 5d9dd4e
- Parents:
- 7e9dadd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/CrimeCaseController.php
r7e9dadd r2bd3041 34 34 $statements = DB::select('select * from statements where c_id=:c_id;',['c_id'=> $wildcard]); 35 35 $evidence = DB::select('select * from evidence_of_case where c_id=:c_id;',['c_id'=> $wildcard]); 36 $victims=[]; 37 $witness=[]; 38 foreach ($statements as $st){ 39 $victim=DB::select('select * from people where pe_id=:pe_id;',['pe_id'=> $st->victim_pe_id]); 40 $victims[] = $victim[0]; 41 } 42 foreach ($statements as $st){ 43 $witnes=DB::select('select * from people where pe_id=:pe_id;',['pe_id'=> $st->witness_pe_id]); 44 $witness[] = $witnes[0]; 45 } 46 36 47 return view('case', [ 37 48 'case' => $case[0], … … 39 50 'statements'=>$statements, 40 51 'evidence'=>$evidence, 52 'victims'=> $victims, 53 'witness'=> $witness 41 54 ]); 55 42 56 } 43 57 }
Note:
See TracChangeset
for help on using the changeset viewer.