Download the PHP package twisted-binary/laravel-feedback-widget without Composer

On this page you can find all versions of the php package twisted-binary/laravel-feedback-widget. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-feedback-widget

Laravel Feedback Widget

An AI-powered feedback widget for Laravel + Inertia + Vue apps. Users describe bugs, feature requests, or general feedback through a guided chat — the AI structures it into a well-formatted GitHub issue automatically.

Features

Requirements

Installation

1. Composer

2. Vite config

The Vue components ship as raw SFCs inside the Composer package. Add a resolve alias so Vite can find them:

3. Publish config (optional)

This publishes config/feedback-widget.php where you can customize routes, middleware, throttling, and more.

4. Publish and run migrations (optional)

AI cost tracking is enabled by default. To create the feedback_ai_costs table:

To disable cost tracking entirely, set FEEDBACK_WIDGET_TRACK_AI_COSTS=false in your .env.

OpenAI API Setup

This package uses the OpenAI API to power the guided feedback chat. Here's how to get set up:

1. Create an OpenAI account

Go to platform.openai.com and sign up or log in.

2. Add billing

Navigate to Settings → Billing and add a payment method. The API is pay-per-use — the default gpt-4o-mini model is very affordable for short feedback conversations.

3. Generate an API key

Go to API keys (platform.openai.com/api-keys) → Create new secret key.

Give it a name (e.g. feedback-widget) and copy the key — you won't be able to see it again.

4. Add to your .env

The OPENAI_FEEDBACK_MODEL setting is optional. gpt-4o-mini is the default and works well for feedback conversations. You can switch to gpt-4o for higher quality responses at a higher cost.

GitHub App Setup

This package uses a GitHub App (not a personal access token) to create issues. Here's how to set one up:

1. Create the GitHub App

Go to github.com/settings/apps/new and configure:

Field Value
App name Something like myapp-feedback
Homepage URL Your app URL
Webhook Uncheck "Active" (not needed)
Permissions → Repository → Issues Read & write
Where can this app be installed? Only on this account

Click Create GitHub App. Note the App ID shown on the next page.

2. Generate a private key

On the app settings page, scroll to Private keys → Generate a private key. A .pem file downloads.

3. Install the app on your repo

On the app settings page, click Install App in the left sidebar → Install on your account → select Only select repositories → pick your feedback repo → Install.

Note the Installation ID from the URL after installing:

4. Base64-encode the private key

Copy the output — you'll use it as GITHUB_APP_PRIVATE_KEY below.

Environment Variables

Add these to your .env:

Usage

Add the widget to your layout:

Note: The widget uses a singleton pattern — only one instance per page is supported.

That's it. The service provider automatically:

Configuration

The full config file (config/feedback-widget.php):

Multilanguage Support

AI Response Language (locale)

Set FEEDBACK_WIDGET_LOCALE in your .env to control the language the AI responds in. When not set, it falls back to app()->getLocale(). For English (en), no extra instruction is prepended to the AI prompt.

Per-user locale

Leave FEEDBACK_WIDGET_LOCALE unset and the widget will automatically use whatever locale your app has set for the current request. If you already set the locale per user via middleware (e.g. app()->setLocale($user->locale)), the AI will respond in that user's language with no extra configuration.

UI Translations (translations prop)

All UI strings have English defaults. To translate the widget, pass a translations prop with your overrides:

You only need to pass the strings you want to override — all others fall back to the English defaults. See the FeedbackTranslations interface for the full list of translatable strings.

Exports

The package exports:

Export Description
FeedbackWidget Full widget with FAB button + chat panel (drop into layout)
FeedbackChatPanel Chat panel only (if you want a custom trigger)
useFeedbackChat Composable with all state and methods
defaultTranslations Default English translations object
FeedbackTranslations TypeScript interface for all translatable strings

AI Cost Tracking

Every chat request logs token usage (prompt tokens, completion tokens, model) to the feedback_ai_costs table. Each conversation is grouped by a UUID conversation_id so you can aggregate usage per feedback session.

Query examples:

To disable, set track_ai_costs to false in your config or .env. No rows will be inserted and the migration is still publishable but optional.

Events

The package dispatches a FeedbackAiCostRecorded event after each AI chat request, allowing your application to react to AI usage (e.g. external billing, analytics, alerting).

Event properties

Property Type Description
userId ?int Authenticated user ID, or null if guest
model string AI model used (e.g. gpt-4o-mini)
promptTokens int Input tokens consumed
completionTokens int Output tokens consumed
feedbackType string Feedback type (bug, feature, feedback)
conversationId string UUID grouping messages in the same session
createdAt Carbon Timestamp of the recorded cost

Listening for the event

The event is dispatched synchronously. If you need async processing, dispatch a queued job from your listener.

How It Works

  1. User clicks the floating action button
  2. Selects feedback type (bug / feature / feedback)
  3. Chats with the AI assistant which guides them through the details
  4. AI produces a structured title + body and asks for confirmation
  5. On confirmation, a GitHub issue is created with proper labels
  6. User sees a success state

License

MIT


All versions of laravel-feedback-widget with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
laravel/framework Version ^12.0|^13.0
openai-php/laravel Version >=0.10 <1.0
lcobucci/jwt Version ^5.0
inertiajs/inertia-laravel Version ^2.0|^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package twisted-binary/laravel-feedback-widget contains the following files

Loading the files please wait ...