Laravel: find if a pivot table record exists
<p>I have two models which are joined by a pivot table, <code>User</code> and <code>Task</code>.</p>

<p>I have a <code>user_id</code> and a <code>task_id</code>.</p>

<p>What is the neatest way to check whether a record exists for this combination of user and task?</p>