← all repositories
google-gemini-php/laravel

A Laravel facade for every Gemini trick in the book

Laravel developers shouldn’t have to hand-roll HTTP calls to Google’s Gemini API.

laravel
Not currently ranked — collecting fresh signals.
star history

What it does This package wraps the base google-gemini-php/client in Laravel conventions, providing a Gemini facade and a config file for environment-based API keys. It covers the generative basics—text, image, and video prompts, multi-turn chat, streaming, structured JSON output, function calling, and image generation—while also exposing file management, cached content, embeddings, and model metadata through the same interface.

The interesting bit The README reads like a feature checklist, but that is the selling point: this is glue code that has kept pace with Google’s v1beta API, including newer additions like thinking-mode configuration, speech generation, and cached content. It even provides a GeminiHelper to programmatically assemble model name strings so you do not have to memorize Google’s versioning syntax.

Key highlights

  • Exposes most of the Gemini v1beta surface: chat, streaming, structured output, function calling, code execution, grounding with Google Search, and system instructions.
  • Handles file uploads, cached content, embeddings, and model listing alongside generation tasks.
  • Includes a GeminiHelper utility for constructing model strings (e.g., gemini-2.5-flash-preview-04-17) from typed parameters.
  • Supports Laravel 9 through 12 and requires PHP 8.1+.

Caveats

  • The 2.0 release introduced breaking changes: the ModelType enum and convenience methods like Gemini::geminiPro() were removed, so upgrading requires manual model string migration.
  • The maintainers note that “there may be other breaking changes not listed here,” which adds a little upgrade roulette.
  • It is explicitly community-maintained, not an official Google package.

Verdict Worth a look if you are building Laravel apps that need deep Gemini integration without writing raw API plumbing. Skip it if you are already happy with a generic HTTP client or need an officially supported Google SDK.

Frequently asked

What is google-gemini-php/laravel?
Laravel developers shouldn’t have to hand-roll HTTP calls to Google’s Gemini API.
Is laravel open source?
Yes — google-gemini-php/laravel is open source, released under the MIT license.
What language is laravel written in?
google-gemini-php/laravel is primarily written in PHP.
How popular is laravel?
google-gemini-php/laravel has 638 stars on GitHub.
Where can I find laravel?
google-gemini-php/laravel is on GitHub at https://github.com/google-gemini-php/laravel.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.