laravel

by grok-phpVerified

Seamlessly integrate Grok AI into Laravel applications with an elegant, developer-friendly package. Leverage powerful AI models for chat, automation, and NLP, while maintaining Laravel's expressive simplicity.

167
Stars
12
Forks
PHP
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/grok-php/laravel

Getting Started

Guides for using skills like laravel.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

🧠 Grok AI Laravel

GrokAI Laravel

A Laravel integration for the GrokPHP Client, designed to effortlessly incorporate Grok AI into Laravel applications with a clean and intuitive API.
Utilize advanced AI models for chat, automation, and natural language processing, all while preserving Laravel's simplicity and elegance.

Latest Version PHP Version Laravel Version Total Downloads GitHub Workflow Status License


Table of Contents


Features

  • Seamless Laravel Integration – Works with Laravel 10, 11, and 12
  • Simple API Client – Access Grok AI models with a clean and intuitive API
  • Supports Chat & Vision – Send both text and image-based requests
  • Streaming Capable – Enable real-time AI responses
  • Configurable Defaults – Set model, temperature, and timeout via config

Installation

Install via Composer:

composer require grok-php/laravel

After installation, run the setup command:

php artisan grok:install

This command will:

  • Publish the configuration file (config/grok.php).
  • Add necessary environment variables to .env.

Add your API key in .env:

GROK_API_KEY=your-api-key

Quick Start

Chat API

use GrokPHP\Laravel\Facades\GrokAI;
use GrokPHP\Client\Config\ChatOptions;
use GrokPHP\Client\Enums\Model;

$response = GrokAI::chat(
    [['role' => 'user', 'content' => 'Hello Grok!']],
    new ChatOptions(model: Model::GROK_2)
);

echo $response->content();

Vision Analysis (Image Recognition)

$response = GrokAI::vision()->analyze(
    'https://example.com/sample.jpg',
    'Describe this image'
);

echo $response->content();

Error Handling

All errors are wrapped in the GrokException class:

use GrokPHP\Client\Exceptions\GrokException;

try {
    $response = GrokAI::chat(
        [['role' => 'user', 'content' => 'Hello!']]
    );
    echo $response->content();
} catch (GrokException $e) {
    echo "Error: " . $e->getMessage();
}

Available Grok AI Models

Model EnumAPI Model NameDescription
Model::GROK_VISION_BETAgrok-vision-betaExperimental vision-enabled model
Model::GROK_2_VISIONgrok-2-visionAdvanced multi-modal vision model
Model::GROK_2_VISION_LATESTgrok-2-vision-latestLatest iteration of Grok vision models
Model::GROK_2_VISION_1212grok-2-vision-1212Enhanced vision model with performance improvements
Model::GROK_2_1212grok-2-1212Optimized chat model
Model::GROK_2grok-2Default general-purpose Grok model
Model::GROK_2_LATESTgrok-2-latestLatest iteration of Grok-2
Model::GROK_BETAgrok-betaExperimental beta model

Default model used: Model::GROK_2


Streaming Responses

Enable real-time AI responses by setting stream: true:

$response = GrokAI::chat(
    [['role' => 'user', 'content' => 'Tell me a story']],
    new ChatOptions(model: Model::GROK_2, stream: true)
);

Streaming is useful for chatbots, assistants, and real-time applications.


Testing

To run PHPUnit tests, copy the phpunit.xml.dist file to phpunit.xml and set your API key.

cp phpunit.xml.dist phpunit.xml
<php>
    <env name="GROK_API_KEY" value="your-grok-api-key"/>
</php>

Now, run the tests:

composer test

Security

If you discover a security vulnerability, please report it via email:
thefeqy@gmail.com


Contributing

Check out CONTRIBUTING.md for guidelines on how to contribute.


License

This package is open-source software licensed under the MIT License.

Frequently Asked Questions

What is laravel?

laravel is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by grok-php. Seamlessly integrate Grok AI into Laravel applications with an elegant, developer-friendly package. Leverage powerful AI models for chat, automation, and NLP, while maintaining Laravel's expressive simplicity. It has 167 GitHub stars.

Is laravel safe to use?

Yes. laravel passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install laravel?

Clone the repository with "git clone https://github.com/grok-php/laravel" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is laravel written in?

laravel is primarily written in PHP. It is open-source under grok-php on GitHub, so you can review or fork the full source.

Are there alternatives to laravel?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh laravel against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details