Advertisement
selimppc

php code

Jun 3rd, 2020
1,375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1.     private function userColumnExists($column, $value, $user_id = "")
  2.     {
  3.         if ($value) {
  4.             $userColumnExists = User::where($column, $value);
  5.             if($user_id) $userColumnExists = $userColumnExists->where("id", "!=", $user_id);
  6.             if($userColumnExists->count() >=1 ) return true;
  7.         }
  8.         return false;
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement