I've noticed this in my install: Spark v5.0.1
Dec 14, 2016
3
Level 3
Switch Team after update
Hey I just updated to the new Spark version. And now Team Switching is not working any one has the same Problem?
I think the Problem is that in the TeamController.php the switchCurrentTeam -> CanJoinTeams.php switchToTeam function want a Team Object.
/**
* Switch the current team the user is viewing.
*
* @param Request $request
* @param \Laravel\Spark\Team $team
* @return Response
*/
public function switchCurrentTeam(Request $request, $team)
{
abort_unless($request->user()->onTeam($team), 404);
$request->user()->switchToTeam($team);
return back();
}
/**
* Switch the current team for the user.
*
* @param \Laravel\Spark\Team $team
* @return void
*/
public function switchToTeam($team)
{
if (! $this->onTeam($team)) {
throw new InvalidArgumentException("The user does not belong to the given team.");
}
$this->current_team_id = $team->id;
$this->save();
}
but its called over a route with an id.
$router->get('/'.$pluralTeamString.'/{team}/switch', 'TeamController@switchCurrentTeam');
Please or to participate in this conversation.