Laravel Relationship availability after save()
<p>I'm building a simple timetracking App using Laravel 5 where I have two Laravel models, one called "User" and one called "Week"</p>

<p>The relationships are pretty simple:<br>
Week.php:</p>

<pre><code>public function user()
{
    return $this-&gt;belongsTo('App\User');
}
</code></pre>

<p>User.php:</p>

<pre><code>function weeks()
{
    return $this-&gt;hasMany('App\Week');
}
</code></pre>

<p>Now, the User.php file also has a simple helper / novelty function called "getCurrentWeek()" that, as the name suggests, returns the current week</p>

<pre><code>function getCurrentWeek()
{
    $possibleWeek = $this-&gt;weeks-&gt;sortByDesc('starts')-&gt;all();
    if(count($possibleWeek) != 0)
    {
        return $possibleWeek[0];
    }
    else
    {
        return null;
    }
}
</code></pre>

<p>My problem is: If I create the very first week for a user and attach / relate it to the user like so:</p>

<pre><code>$week = new Week;

//Omitted: Setting so attributes here ...

$week-&gt;user_id = $user-&gt;id;
$weeks-&gt;save()
$user-&gt;weeks()-&gt;save($week);
</code></pre>

<p>And then call the <code>$user-&gt;getCurrentWeek();</code> method, that method returns <code>null</code>, although a new week has been created, is related to the user and has been saved to the database. In my mind, the expected behaviour would be for <code>getCurrentWeek()</code> to return the newly created week.<br>
What am I misunderstanding about Eloquent here / doing just plain wrong?</p>