⚡️ OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with OpenAI API
3.7k
Stars
264
Forks
14
Open issues
22
Contributors
AI Analysis
OpenAI PHP for Laravel is a Laravel-integrated PHP API client that provides a facade-based interface to interact with OpenAI's API. It serves Laravel developers who need seamless OpenAI integration within their applications; it is not suitable for framework-agnostic PHP projects (which should use the base openai-php/client instead).
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Laravel-native OpenAI PHP client: framework integration layer over established base library
OpenAI PHP for Laravel is a Laravel-specific wrapper around the framework-agnostic openai-php/client library. It provides Facade-based access, configuration management, and testing helpers tailored to Laravel's conventions. Primary audience: Laravel developers building AI features. Adoption is moderate relative to Laravel's scale; adoption is verified through Packagist download metrics but exact production usage remains undocumented.
Created December 2022 during the initial wave of OpenAI API adoption. Maintained by Nuno Maduro and Sandro Gehri, both active in the PHP open source community. Positioned explicitly as a framework-integration layer over the standalone openai-php/client, released approximately 4 weeks after ChatGPT public launch.
Steady, modest growth since launch. 3,739 stars and 263 forks indicate niche-but-engaged adoption. Recent activity (last push 30 June 2026, 7 stars gained in last 7 days) suggests active maintenance but not viral expansion. Growth appears driven by Laravel ecosystem adoption rather than market saturation—reflects the size and maturity of the Laravel community rather than rapid conversion of new users.
Packagist download metrics referenced but exact numbers not provided in metadata. GitHub stars (3,739) and fork count (263) suggest adoption in single-digit thousands of projects, likely concentrated in Laravel ecosystem. No documented case studies, company endorsements, or large-scale production deployments mentioned in README. Adoption not verified beyond proxy metrics.
Likely implements Laravel Service Provider pattern for registration, Facade for API access, and custom configuration publishing via artisan commands. Appears to delegate core API logic to openai-php/client and focus on Laravel-specific integration (dependency injection, config management, testing mocking). Not inspected directly; inferred from README.
README explicitly documents testing via `OpenAI::fake()` method with request assertion helpers (e.g., `OpenAI::assertSent()`). Indicates mature testing story. GitHub Actions badge shown; actual coverage percentage not documented in excerpt.
Last push 30 June 2026 (4 days before analysis date). Tests workflow badge present and presumably passing. No evidence of maintenance burden issues; appears to receive regular updates. Activity level consistent with a mature, stable package rather than actively expanding feature set.
ADOPT IF: you are building with Laravel and need straightforward access to OpenAI API with minimal boilerplate; you prefer Facade-based access and Laravel config conventions; you want a well-tested, framework-integrated solution. AVOID IF: you need to stay framework-agnostic (use openai-php/client instead); you require higher-level AI abstractions (consider laravel/ai); your project is not Laravel-based. MONITOR IF: laravel/ai (official package) gains features that overlap; if you are building multi-framework AI tooling, watch whether Laravel's official stance shifts toward centralizing on laravel/ai rather than third-party integrations.
Independent dimensions
Mainstream potential
3/10
Technical importance
5/10
Adoption evidence
4/10
- Dependency on openai-php/client—changes in upstream library could require adapter updates; no evidence of how quickly laravel package follows upstream releases.
- Laravel ecosystem fragmentation: laravel/ai (official) competes for mindshare and may eventually be preferred by organizations standardizing on first-party packages.
- No documented SLA or corporate backing; maintenance depends on volunteer effort from Nuno Maduro and Sandro Gehri. Burnout or availability changes could pause updates.
- Adoption appears narrowly concentrated in Laravel community; no evidence of use outside Laravel, limiting potential for cross-project collaboration or ecosystem leverage.
- OpenAI API breaking changes or deprecations would require rapid coordinated updates across both openai-php/client and this package; unclear how quickly this occurs in practice.
Likely to remain a stable, niche-focused Laravel integration indefinitely. Not expected to dominate even within Laravel; may face gradual pressure from laravel/ai if Laravel community rallies around official solutions. Most probable outcome: slow steady-state maintenance with periodic updates to track OpenAI API changes, serving existing Laravel projects without significant new user acquisition.
Explore similar
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- PHP
- License
- MIT
- Last updated
- 2w ago
- Created
- 43mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Support for Webhooks
Feature Request: Add support for per-request custom headers
Feature Request: Support for Chunk Ranking in File Search
Can we get a feature to specify project keys. At the moment we're forced to use one OpenAI key
Top contributors
Similar repos
openai-php/client
OpenAI PHP is a community-maintained API client enabling PHP developers to...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
3.7k | +4 | PHP | 8/10 | 2w ago |
|
|
5.8k | — | PHP | 8/10 | 4w ago |
|
|
1k | — | PHP | 7/10 | 9h ago |
|
|
31.1k | — | Python | 8/10 | 19h ago |
|
|
2.4k | — | PHP | 7/10 | 4mo ago |
Parent library; framework-agnostic, lower-level. Laravel is built on top of this. More stars (5,805) but requires manual integration. Tradeoff: client is portable, Laravel adds convenience.
Official Laravel package for AI abstractions. Fewer stars (1,028) but may offer higher-level abstractions and official support. Direct competitor for Laravel-native use cases; laravel/ai may encourage standardization around Laravel's own AI layer.
Broader PHP AI client abstraction layer (2,399 stars). Vendor-agnostic wrapper. Requires manual Laravel integration; openai-php/laravel is more opinionated but Laravel-specific.
Python equivalent. Not competitive in PHP ecosystem but indicates relative scale: OpenAI's own Python client has 31k stars. PHP ecosystem is smaller; Laravel subset is smaller still.