public function applyScopesToUser($user, array $scopes)
	{
		if (! is_a($user, Model::class)) {
			$this->fail('User is not a model.');
		}

		$scopes = array_map(
			function ($scope) {
				return ['oauth_scope_id' => $scope];
			}, $scopes
		);

		$user->scopes()->attach($scopes);

		return $user->fresh(['scopes']);
	}