title: Laravel contains() for multiple values
body: <p>I want to know if it is possible to use <code>contains()</code> for multiple values.</p>
  
  <p>For example, let's say I have the following <code>perms</code> table:</p>
  
  <pre><code>  TABLE `perms` (
    `id` int(11) NOT NULL,
    `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `action` varchar(255) COLLATE utf8_unicode_ci NOT NULL
    )
  </code></pre>
  
  <p>Example rows:</p>
  
  <pre><code>  INSERT INTO `perms` (`id`, `subject`, `action`) VALUES
    (1, 'Product', 'Create'),
    (2, 'Product', 'Read'),
    (3, 'Product', 'Update'),
    (4, 'Product', 'Delete');
  </code></pre>
  
  <p>My users have a <code>belongsToMany</code> relationship with a <code>users_perms</code> table, where a user can have any number of <code>perms</code>.</p>
  
  <p>I want to check if a user has a perm which contains a <code>subject</code> AND an <code>action</code>. So, I want to check if a user has the perm to <code>Create</code> a <code>Product</code>.</p>
  
  <p>Right now the following code works when checking just the <code>action</code>:</p>
  
  <pre><code>  $action = 'Create';
    $user-&gt;perms-&gt;contains('action', $action); // true if they have ANY Create action perm
  </code></pre>
  
  <p>But I need this to also check the <code>subject</code> too, because it isn't enough to just check the <code>action</code>. So I need something like:</p>
  
  <pre><code>  $subject = 'Product';
    $action = 'Create';
    $user-&gt;perms-&gt;contains([
      ['subject', $subject],
      ['action', $action],
    ]);
  </code></pre>
  
  <p>How do I do this?</p>