- Timestamp:
- 02/08/24 16:34:49 (9 months ago)
- Branches:
- main
- Children:
- d9c4096
- Parents:
- cf84baa
- Location:
- app/Http/Controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/CrimeCaseController.php
rcf84baa r6dec591 4 4 5 5 use Illuminate\Http\Request; 6 6 use Illuminate\Support\Facades\DB; 7 use Illuminate\Support\Facades\Session; 7 8 class CrimeCaseController extends Controller 8 9 { 9 10 function cases(){ 10 return view('cases'); 11 12 $police_station= DB::select('select * from police_station where pe_id=:pe_id;',['pe_id'=> Session::get('pe_id')]); 13 $cases = DB::select('select * from crime_case where p_id=:p_id;',['p_id'=> $police_station[0]->p_id]); 14 15 return view('cases', [ 16 'cases' => $cases 17 ]); 18 11 19 } 12 20 function case(){ -
app/Http/Controllers/SessionsController.php
rcf84baa r6dec591 13 13 public function store() 14 14 { 15 16 15 $credentials = request()->validate([ 17 16 'badge_no' => 'required', … … 42 41 Session::put('badge_no', $badge_no); 43 42 Session::put('is_policeman', $policeman); 43 Session::put('pe_id', $exists[0]->pe_id); 44 44 return redirect()->intended('/'); 45 45 }
Note:
See TracChangeset
for help on using the changeset viewer.