PHPackages                             cometcast/openapi-php-sdk-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. cometcast/openapi-php-sdk-laravel

ActiveLibrary[API Development](/categories/api)

cometcast/openapi-php-sdk-laravel
=================================

v20251127-beta(7mo ago)0660Apache-2.0PHPPHP ^7.2|^8.0

Since Nov 18Pushed 7mo agoCompare

[ Source](https://github.com/cometcastsdk/php-sdk-laravel)[ Packagist](https://packagist.org/packages/cometcast/openapi-php-sdk-laravel)[ Docs](https://github.com/cometcast/php-sdk-laravel)[ RSS](/packages/cometcast-openapi-php-sdk-laravel/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (3)Used By (0)

Cometcast OpenAPI Laravel SDK
=============================

[](#cometcast-openapi-laravel-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7de8fd6eb89ccac69f4059f23f407309f279bdf4d92114c142dabeb359c0796e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6d6574636173742f7068702d73646b2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cometcast/php-sdk-laravel)[![Total Downloads](https://camo.githubusercontent.com/f0888c2c377bf3baade20b2cb4743bc89d9ffe73284ca122cde1f82054ae25f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6d6574636173742f7068702d73646b2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cometcast/php-sdk-laravel)[![GitHub Actions](https://github.com/cometcast/php-sdk-laravel/actions/workflows/main.yml/badge.svg)](https://github.com/cometcast/php-sdk-laravel/actions/workflows/main.yml/badge.svg)

這是一個為 Laravel 框架設計的 Cometcast OpenAPI SDK 套件，提供 OIDC 認證功能。

安裝
--

[](#安裝)

透過 Composer 安裝套件：

```
composer require cometcast/php-sdk-laravel
```

發布配置檔案
------

[](#發布配置檔案)

發布套件配置檔案到您的應用程式：

```
php artisan vendor:publish --provider="Cometcast\OpenApi\Laravel\PhpSdkLaravelServiceProvider" --tag="config"
```

這會在 `config/cometcast-openapi.php` 建立配置檔案。

環境變數設定
------

[](#環境變數設定)

在您的 `.env` 檔案中設定以下 OIDC 相關環境變數：

```
# OIDC 客戶端 ID
COMETCAST_OPENAPI_CLIENT_ID=your_client_id

# OIDC 重導向 URI
COMETCAST_OPENAPI_REDIRECT_URI=your_redirect_uri

# OIDC 客戶端密鑰
COMETCAST_OPENAPI_CLIENT_SECRET=your_client_secret

# OIDC 認證伺服器基礎 URL
COMETCAST_OPENAPI_AUTH_BASEURL=https://your-auth-server.com

# OIDC 授權範圍
COMETCAST_OPENAPI_SCOPES=openid,profile,email

# OpenAPI 基礎 URL
COMETCAST_OPENAPI_BASE_URL=https://your-api-server.com

# SSL 驗證設定（開發環境可設為 false）
COMETCAST_OPENAPI_SSL_VERIFY=false
```

使用方式
----

[](#使用方式)

OIDC 登入URL 示範 (Controller)
--------------------------

[](#oidc-登入url-示範--controller)

```
use Cometcast\Openapi\OpenIdProvider;

public function index(OpenIdProvider $oidcProvider)
{
    $provider->setPkceCode('pkce-code');

    $url = $provider->getAuthorizationUrl('authorization_code', [
        'ui_locales' => 'zh_TW'     // 指定語系
    ]);

    return redirect()->to($url);
}
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Chou, Yu-Hsien](https://github.com/cometcast)
- [All Contributors](../../contributors)

License
-------

[](#license)

The Apache License 2. Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance64

Regular maintenance activity

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Total

2

Last Release

219d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8385770?v=4)[小周](/maintainers/slps970093)[@slps970093](https://github.com/slps970093)

---

Top Contributors

[![slps970093](https://avatars.githubusercontent.com/u/8385770?v=4)](https://github.com/slps970093 "slps970093 (6 commits)")

---

Tags

cometcastphp-sdk-laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cometcast-openapi-php-sdk-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/cometcast-openapi-php-sdk-laravel/health.svg)](https://phpackages.com/packages/cometcast-openapi-php-sdk-laravel)
```

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.8k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[rapidez/core

Rapidez Core

1823.5k72](/packages/rapidez-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
