getting internal server error if there is no user with mobile number

This commit is contained in:
Utkarsh Pandey
2023-06-02 14:59:41 +05:30
committed by RafficMohammed
parent 752c4f5bf2
commit 697c177a0b

View File

@@ -609,8 +609,8 @@ class TicketController extends Controller
*/
public function checkMobile($mobile)
{
$check = User::where('mobile', '=', $mobile)->first();
if (count($check) > 0) {
$check = User::where('mobile', '=', $mobile);
if ($check && $check->count() > 0) {
return true;
}