$users->has($user)

Checks if a $user object is included in the collection

  • $user (User | string)
    Accepts a username or a user object
  • return (boolean)
<?php if($site->users()->has('someone')): ?>
There exists a user with the username `someone`
<?php endif ?>