Eloquent create column if not in whereIn()
<p>I have a query like this:</p>

<pre><code>$valid_statuses = array('1', '2', '3');

$results = User::with(['posts' =&gt; function($query) use ($valid_statuses) {
            $query-&gt;whereIn('status', $valid_statuses);
        }
    ])
    -&gt;get();
</code></pre>

<p>An example of the table looks like this:</p>

<pre><code>+----+---------+--------+
| id | post_id | status |
+----+---------+--------+
|  1 |       1 |      1 |
|  2 |       1 |      2 |
|  3 |       2 |      1 |
|  4 |       2 |      3 |
+----+---------+--------+
</code></pre>

<p>What I need the query to do is, if a <code>post_id</code> is missing a <code>valid_status</code>, it needs to add the missing status to the query result. The output resultant query should look like:</p>

<pre><code>+----+---------+--------+
| id | post_id | status |
+----+---------+--------+
|  1 |       1 |      1 |
|  2 |       1 |      2 |
|  3 |       1 |      3 |
|  4 |       2 |      1 |
|  5 |       2 |      2 |
|  6 |       2 |      3 |
+----+---------+--------+
</code></pre>

<p>How can I do this?</p>