Download the PHP package dij-digital/langfuse-laravel without Composer
On this page you can find all versions of the php package dij-digital/langfuse-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dij-digital/langfuse-laravel
More information about dij-digital/langfuse-laravel
Files in dij-digital/langfuse-laravel
Package langfuse-laravel
Short Description This is my package langfuse-laravel
License MIT
Homepage https://github.com/dij-digital/langfuse-laravel
Informations about the package langfuse-laravel
Langfuse Laravel - A Laravel Facade for the PHP Langfuse API package.
This package provides a wrapper around the langfuse-php package, allowing you to easily integrate Langfuse into your Laravel applications. It uses as few dependencies as possible.
Features
- Tracing - Create traces, spans and generations that send directly to the Langfuse API
- Prompts - Fetch, compile and create text and chat prompts with fallback support
- Facade with direct access to
prompt()andingestion()methods
Requires PHP 8.3 or PHP 8.4 in combination with Laravel 11 or Laravel 12
Installation
Configuration
Add the following environment variables to your .env file:
Publish the config file (optional):
Usage
Tracing
Every call sends directly to the Langfuse API. No buffering, no flushing.
Prompts
Testing
Use the fake() method to mock HTTP responses. The langfuse-php package ships with testing response helpers that provide sensible defaults — just override the fields you care about:
Available test response helpers in DIJ\Langfuse\PHP\Testing\Responses:
GetPromptResponse— text prompt fetchGetChatPromptResponse— chat prompt fetchNoPromptFoundResponse— 404 prompt not foundPostPromptResponse— text prompt creationPostChatPromptResponse— chat prompt creationPatchPromptLabelsResponse— prompt label updateGetPromptListPageOneResponse— first page of prompt listGetPromptListPageTwoResponse— second page of prompt list
Responses are consumed sequentially (Guzzle MockHandler), so the order of responses must match the order of HTTP calls your code makes.
Development
Ingestion
Langfuse Laravel was created by Tycho Engberink and is maintained by DIJ Digital under the MIT license.
All versions of langfuse-laravel with dependencies
dij-digital/langfuse-php Version ^0.2.0
illuminate/contracts Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16