Looking to hire Laravel developers? Try LaraJobs

laravel-prompts maintained by curly-deni

Description
Prompt rendering infrastructure for Laravel applications.
Last update
2026/09/30 13:30 (dev-main)
License
Downloads
3

Comments
comments powered by Disqus

Laravel Prompts

Versioned Markdown Blade prompt templates for Laravel applications.

Installation

composer require curly-deni/laravel-prompts

Laravel discovers the service provider automatically. Publish the config when you need to customize the prompt directory or active versions:

php artisan vendor:publish --tag=laravel-prompts-config

By default templates are read from resources/prompts. Organize them under layouts and parts, using the logical name and version in each filename:

resources/prompts/
├── layouts/welcome/greeting_v2.md.blade.php
└── parts/shared/signature_v1.md.blade.php

Set active versions in config/prompts.php. Names can be dot-separated keys or nested arrays:

'layouts' => [
    'welcome.greeting' => 2,
],
'parts' => [
    'shared.signature' => 1,
],

Usage

Render a full prompt and pass data to its Blade template:

use Aesis\Prompts\Services\PromptService;

$prompt = app(PromptService::class)->renderPrompt('welcome.greeting', [
    'name' => 'Ada',
]);

Render a reusable part from a Blade view:

@prompt('shared.signature')

You can select a part version explicitly with renderPart('shared.signature', 2) or @prompt('shared.signature', 2). Template names accept letters, numbers, underscores, and hyphens in each dot-separated segment.

Development

composer test
composer format
composer analyse

License

MIT. See LICENSE.md.