public function update(UserPolicy $user, Team $team)
    {
        if ($user->canDo('team.team.edit') && $user->isAdmin()) {
            return true;
        }

        return $team->user_id == user_id() && $team->user_type == user_type();
    }
public function update(UserPolicy $user, Team $team)
    {
        if ($user->canDo('team.team.edit') && $user->isAdmin()) {
            return true;
        }

        return $team->user_id == user_id() && $team->user_type == user_type();
    }
public function update ( UserPolicy $ user , Team $ team ) { if ( $ user -> canDo ( 'team.team.edit' ) && $ user -> isAdmin ( ) ) { return true ; } return $ team -> user_id == user_id ( ) && $ team -> user_type == user_type ( ) ; }
Determine if the given user can update the given team.

@param UserPolicy $user
@param Team $team

@return bool
Determine if the given user can update the given team .