where('phone','=',$value) ->first(); if ($user) { if($user->user_id == $user_id){ return true; } } return false; } }