Changeset f7acd52 for app/Http/Controllers
- Timestamp:
- 04/22/24 20:14:54 (8 months ago)
- Branches:
- main
- Children:
- 249bf91
- Parents:
- 5d9dd4e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/CrimeCaseController.php
r5d9dd4e rf7acd52 33 33 $p_address = DB::select('select p_address from police_station where p_id=:p_id;',['p_id'=> $case[0]->p_id]); 34 34 $statements = DB::select('select * from statements where c_id=:c_id;',['c_id'=> $wildcard]); 35 $evidence = DB::select('select * from evidence_of_case where c_id=:c_id;',['c_id'=> $wildcard]); 35 36 36 37 $victims=[]; 37 38 $witness=[]; 39 $evidence_id = []; 40 $evidence = []; 41 foreach ($statements as $statement) { 42 $evidence_id = DB::select('select * from mentions_evidence where s_id=:s_id;',['s_id'=> $statement->s_id]); 43 if (!empty($evidence_id)) { // Check if $evidence_id is not empty 44 $evidence_id[] = $evidence_id[0]; 45 } 46 } 47 $evidence_id=collect($evidence_id)->unique(); 48 foreach ($evidence_id as $e) { 49 $evidence = DB::select('select * from evidence where e_id=:e_id;',['e_id'=> $e->e_id]); 50 $evidence[] = $evidence[0]; 51 } 38 52 foreach ($statements as $st){ 39 53 $victim=DB::select('select * from people where pe_id=:pe_id;',['pe_id'=> $st->victim_pe_id]);
Note:
See TracChangeset
for help on using the changeset viewer.