Prompt

Prompt stats

Downloads
2
Stars
0
Open Issues
0
Forks
0

View on GitHub →

Manage AI prompts in Blade style.

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']
]);
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Chimit Prompt Related Articles

Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
LoadForge logo

LoadForge

Scalable load testing for web apps & APIs. Simulate real-world traffic and identify breaking points and performance limits with powerful, scalable load tests designed for Laravel.

LoadForge
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media