chimit/
prompt
g4t.io

Manage AI Prompts in Your Laravel App with Markdown and Blade

43 stars by Paul Redmond

Manage AI prompts in Blade style.

README from chimit/prompt Open on GitHub →

Prompt

Prompt is a simple Laravel package for managing your AI prompts in Markdown files, with the full power of Blade.

Installation

You can install the package via composer:

composer require chimit/prompt

Usage

Create Your Prompts

Create your prompt files in the resources/prompts directory using the .md extension. You can organize them in subdirectories as needed:

resources/
└── prompts/
    ├── seo/
    │   └── product-meta.md
    └── welcome.md

Use Blade Syntax in Your Prompts

Your prompt files support full Blade syntax, including variables, PHP expressions, and unsafe HTML rendering. Here's an example resources/prompts/seo/product-meta.md:

You are an SEO expert specializing in e-commerce. Generate a compelling meta description for this product.

**Product:** {{ $product->name }}
**Price:** ${{ number_format($product->price, 2) }}

**Product Description:**
---
{!! $product->description !!}
---

@if($product->discount_percentage > 0)
**Special Offer:** {{ $product->discount_percentage }}% OFF - Limited Time!
@endif

Requirements:
- Maximum 160 characters
- Include the product name and key benefits
- Create urgency if there's a discount
- Target keywords: {{ implode(', ', $keywords) }}

Render Your Prompts

Use the Prompt::get() method to render your prompts with data, just like you would with Blade views:

use Chimit\Prompt;

$prompt = Prompt::get('seo/product-meta', [
    'product' => $product,
    'keywords' => ['wireless headphones', 'bluetooth', 'noise cancelling']
]);

More from the ecosystem

marcreichel/
laya-php
g4t.io
3 53

LayaPHP: Self-Hosted Text Classification for PHP and Laravel

Classify text in PHP without an LLM bill: typed decisions in 100+ languages, self-hosted. Laravel-ready SDK for Laya, a Jev AI alternative.

ai classification decision-engine
marcreichel/laya-php via Laravel News
Josh-Dovey/
postcodes-laravel
g4t.io
5 9

Postcodes for Laravel: GB Postcode Lookup and Geography Data

Postcodes for Laravel adds typed GB postcode lookups, validation, geography data, distance searches, and test fakes through the GB Postcodes API.

Josh-Dovey/postcodes-laravel via Laravel News
RedberryProducts/
mailbox-for-laravel
g4t.io
4 115

Mailbox for Laravel: Preview and Test Rendered Email

Mailbox for Laravel captures outgoing mail in a local dashboard and lets you test rendered HTML, recipients, and attachments with fluent assertions.

RedberryProducts/mailbox-for-laravel via Laravel News