The problem is because the current logged in user doesn't have any teams yet so you'll have to check it first before handing it in the query like this.
return static::when(Auth::user()->currentTeam()->exists(), function ($q) {
$q->where('team_id','=', Auth::user()->currentTeam->id)
})
->groupBy('mob')
->get();
thanks @tykus. now I am receiving "Call to a member function exists() on null (View: /Users/charlie/Code/farming/resources/views/vendor/spark/nav/user.blade.php)"
The code above would return all the teams if the user doesn't have a current team. Is that what you intended to do? Doesn't look like it from your original code.
All you really need is just an optional wrapper around the currentTeamin your original code: