public function searchVictims($searchType, $searchStr) { $victims = Victim::where($searchType, 'LIKE', $searchStr)->get(); if ($victims) { return $victims; } return null; }
public function checkIfExists(Request $request) { $data = $request->all(); if (Victim::where('victimId', '=', $data['victimId'])->exists()) { return "false"; } return "true"; }