public function createClientWithScopes($id, $secret, array $scopes)
	{
		$client         = $this->oauthClientClass(true);
		$client->id     = $id;
		$client->secret = $secret;
		$client->name   = $id;
		$client->save();

		$apply_scopes = [];
		foreach ($scopes as $scope) {
			$apply_scopes[] = [
				'client_id' => $id,
				'scope_id'  => $scope,
			];
		}

		DB::table('oauth_client_scopes')->insert($apply_scopes);

		return $client;
	}