Customizable Feedback Component for Laravel

Overview

Due to a stupid copyright infringement I had to rename this package.

Note that nothing in the code changed (still same namespace). Only the package name has changed. Namespace might changed later in a major release.

Customizable Feedback Component for Laravel

Latest Version on Packagist Software License Build Status Code Quality

Introduction

Laravel Feedback Component allows you to easily implement a Customer Feedback component on your website. It is build with VueJS but can be implemented in any kind of Laravel Project. You just need to drop a few lines in your layout.

You probably know a lot of website that use intercom's chatting system, or crisp, chat.io and many more customer chat allowing you to get feedbacks from your website visitors.

Laravel Feedback Component is an open-source and customizable alternative that adopts the same layout. Once installed, you will see the component on your website.

We also have a Nova Tool for it!

Chatting System

I'll work on implementing a chatting system in Laravel Feedback Component, that will probably work with Laravel Nova. This is planned for V2. For now, you can only gather feedbacks from your visitors.

Demo

Laravel Feedback Component

Installation & Configuration

You may use Composer to Install Laravel Feedback Component:

composer require mydnic/laravel-kustomer

After installing Laravel Feedback Component, publish its assets using the kustomer:publish Artisan command. After installing the package, you should also run the migrate command:

php artisan kustomer:publish

php artisan migrate

This will create a new feedbacks table.

Configuration

You can update the configuration of the component as you wish by editing config/kustomer.php.

I encourrage you to carefully read this config file.

Translations

All the texts that you can see in the components are translatable. After publishing the assets, you will find the texts in resources/lang/vendor/en/kustomer.php

The feedbacks labels are stored in this file as well, and the feedbacks array must match the one from you config file.

Display the component

In your public/ directory you'll find compiled css and js files that needs to be included into your html layout.

Include these on the pages you want the components to appear :

@include('kustomer::kustomer') ">
<head>
    <script src="{{ asset('vendor/kustomer/js/kustomer.js') }}" defer>script>
head>
<body>
    @include('kustomer::kustomer')
body>

Attention If you run a VueJS application, you must add the #kustomer container outside your #app container. This is because kustomer runs on its own vue instance by default. If you want to change that, see Include assets with your own assets

Updating

When updating this package, you should re-publish the assets:

php artisan vendor:publish --tag=kustomer-assets --force

This will re-publish the compiled JS and CSS files, but also the svg files located in public/vendor/kustomer/assets. If you want to use your own images, please update the configuration file.

Include assets with your own assets

Optionnally, you can import the .vue and .sass files into your own resources/js and resources/sass folders, allowing you to heavily customize the Feedback Component components and layout.

This will also allow you to end up with only one compiled .js and .css in your app.

However, you should be carefull if you're trying to update the a latest version, because your changes might be lost.

Pre requisite

Two npm packages are required:

  • axios
  • html2canvas

You can add them via npm or yarn.

We are using axios to make the HTTP request to send the feedback, so make sure axios is installed an configured in your vue app.

As in the Laravel scaffolding javascript, axios should be configured like so:

window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

let token = document.head.querySelector('meta[name="csrf-token"]');

if (token) {
    window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
    console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}

Install

Publish the VueJS component:

php artisan vendor:publish --tag=kustomer-vue-component

Publish the SASS style file:

php artisan vendor:publish --tag=kustomer-sass-component

Then in your vue app:

// app.js
Vue.component('kustomer', require('./components/Kustomer/Kustomer.vue'));
// app.scss
@import 'kustomer';

Retrieve Feedbacks

A Feedback essentially has 4 attributes:

  • Type : Represents the "category" of the feedback (bug, like, suggestion, etc)
  • Message : the typed message from your visitors
  • User Infos : a JSON column containing all sorts of informations about the user's request
  • Reviewed : a boolean column allowing to mark a feedback as "reviewed"

Once a Feedback is stored in your database, you can use your own backoffice to display and manipulate the datas.

The Feedback model works like any other Eloquent model so it's very easy to use in your Laravel Application.

Using Laravel Nova ? No problem !

Use With Laravel Nova

If you're using Laravel Nova you will certainly want a tool to visualize all feedbacks that you have received.

You can install the official Laravel Nova Tool here.

Event, Job, Notification, etc

When a new feedback is correctly stored, we will dispatch a Laravel Event.

You can listen to this event and trigger any kind of listeners. It's up to you to decide what happens next! You can send an email to the administrator, log some data, or whatever you can think about.

In your EventServiceProvider you can update the $listen property to add the Event.

protected $listen = [
    'Mydnic\Kustomer\Events\NewFeedback' => [
        'App\Listeners\YourOwnListener', // change this
    ],

    // ...
];

License

Laravel Kustomer is an open-sourced software licensed under the MIT license.

In this project you will find some svg icons that come from FlatIcon. You're free to change them in your own project.

Comments
  • Console Warning - Running Vue in development mode

    Console Warning - Running Vue in development mode

    Hello,

    I am using the latest version of the package but I am seeing a warning in console about running Vue in dev mode:

    You are running Vue in development mode. Make sure to turn on production mode when deploying for production. See more tips at https://vuejs.org/guide/deployment.html

    Can the package be update to use production version?

    Thanks,

    opened by sutcliffe121 3
  • Feature Request: Screen elements capturing with feedback

    Feature Request: Screen elements capturing with feedback

    It is a feature if you want to implement it. I think adding a screen capturing with feedback would be greate like saberfeedback.com provides in their feedback form.

    opened by mshoaibdev 3
  • Feature Request: Translation for text

    Feature Request: Translation for text

    It would be great, if we can define a localization string in the config file instead of passing the localized text directly. E.g. "feedback.successMessage" instead of "Thank you for your feedback!" and pass that string to the Translation helper function.

    enhancement 
    opened by stephanrueschenbaum 3
  • Feature Request: Passing a file or screenshot into the chat

    Feature Request: Passing a file or screenshot into the chat

    It would be handy to have a guest or user pass a file or screenshot into the conversation. This could be an config option as well.

    I would suggest for screenshots, using the HTML2Canvas package (https://html2canvas.hertzen.com) which is super handy!

    enhancement 
    opened by Braunson 3
  • A live demo would be great

    A live demo would be great

    Hello ! A live demo would be great or at leat you could add a gif to the readme, something as seen on https://madewithlaravel.com/laravel-feedback-component

    opened by smknstd 2
  • TypeError: Cannot read property 'title' of undefined

    TypeError: Cannot read property 'title' of undefined

    Hello,

    im running Laravel v7. i have added the script in head section and the include statement in body tag

    onload im getting the js error in console:

    TypeError: Cannot read property 'title' of undefined

    am i missing something? Thank for help :)

    opened by mafudelaptu 2
  • Metadata on the feedback

    Metadata on the feedback

    Great package! I have some feature requests to make the package even better.

    Add date and time It would be wonderful to add a timestamp to the post so it's easier to place in a context.

    Screenshot for visual example:

    Screenshot 2019-12-17 kl  13 27 35

    User For us, and for the client, it would be good to collect which user is submitting the feedback.

    Once again - great package. Good job!

    opened by kodameraadam 2
  • Bump laravel-mix from 5.0.5 to 5.0.6

    Bump laravel-mix from 5.0.5 to 5.0.6

    Bumps laravel-mix from 5.0.5 to 5.0.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies javascript 
    opened by dependabot-preview[bot] 1
  • Bump sass from 1.26.11 to 1.26.12

    Bump sass from 1.26.11 to 1.26.12

    Bumps sass from 1.26.11 to 1.26.12.

    Release notes

    Sourced from sass's releases.

    Dart Sass 1.26.12

    To install Sass 1.26.12, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.

    Changes

    • Fix a bug where nesting properties beneath a Sass-syntax custom property (written as #{--foo}: ...) would crash.

    See the full changelog for changes in earlier releases.

    Changelog

    Sourced from sass's changelog.

    1.26.12

    • Fix a bug where nesting properties beneath a Sass-syntax custom property (written as #{--foo}: ...) would crash.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies javascript 
    opened by dependabot-preview[bot] 1
  • Bump symfony/http-kernel from 4.4.7 to 4.4.13

    Bump symfony/http-kernel from 4.4.7 to 4.4.13

    Bumps symfony/http-kernel from 4.4.7 to 4.4.13.

    Release notes

    Sourced from symfony/http-kernel's releases.

    v4.4.13

    Changelog (https://github.com/symfony/http-kernel/compare/v4.4.12...v4.4.13)

    • no changes

    v4.4.12

    Changelog (https://github.com/symfony/http-kernel/compare/v4.4.11...v4.4.12)

    • bug #37841 Backport handler lock when using VAR_DUMPER_FORMAT (ogizanagi)

    v4.4.11

    Changelog (https://github.com/symfony/http-kernel/compare/v4.4.10...v4.4.11)

    • bug #37341 Fix support for PHP8 union types (nicolas-grekas)

    v4.4.10

    Changelog (https://github.com/symfony/http-kernel/compare/v4.4.9...v4.4.10)

    • bug #37182 Fix regression where Store does not return response body correctly (mpdude)

    v4.4.9

    Changelog (https://github.com/symfony/http-kernel/compare/v4.4.8...v4.4.9)

    • bug #36891 Address deprecation of ReflectionType::getClass() (derrabus)
    • bug #36833 Fix that the Store would not save responses with the X-Content-Digest header present (mpdude)
    • bug #36855 Fix error logger when stderr is redirected to /dev/null (fabpot)
    • bug #36838 Bring back the debug toolbar (derrabus)
    • bug #36789 Change priority of KernelEvents::RESPONSE subscriber (marcw)

    v4.4.8

    Changelog (https://github.com/symfony/http-kernel/compare/v4.4.7...v4.4.8)

    • bug #36434 silence E_NOTICE triggered since PHP 7.4 (xabbuh)
    • bug #36342 fix compat with Debug component (nicolas-grekas)
    • bug #36239 Prevent keys collisions in the sanitized logs processing (fancyweb)
    Commits
    • 2bb7b90 Update VERSION for 4.4.13
    • cdf1e9b security #cve-2020-15094 Remove headers with internal meaning from HttpClient...
    • 8e8d0ed Remove headers with internal meaning from HttpClient responses
    • a5ed890 Bump Symfony version to 4.4.13
    • f93f6b3 Update VERSION for 4.4.12
    • 98fb210 minor #37831 stop using deprecated PHPUnit APIs (xabbuh)
    • 4b232e3 stop using deprecated PHPUnit APIs
    • ce729cd Fix CS
    • b8542b3 Merge branch '3.4' into 4.4
    • 3ab83d2 Fix CS
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies php 
    opened by dependabot[bot] 1
  • You are running Vue in development mode.

    You are running Vue in development mode.

    HI. I noticed that public/js/kustomer.js file size is 1.22 MB, which is huge for production. Probably because you used development build. There is warning in console

    You are running Vue in development mode. Make sure to turn on production mode when deploying for production. See more tips at https://vuejs.org/guide/deployment.html

    Could you please make prod version of js and css files. Minification would be great to.

    opened by guratr 1
  • A.params.colors is undefined - Laravel livewire?

    A.params.colors is undefined - Laravel livewire?

    Using alpine/livewire on loading in Kucstomer we are getting this error. Any suggestions? config file is published.

    I am wondering if A.params is somehow being unset.

    opened by TonyPartridgeR 1
  • Feature Request: Users vote for features

    Feature Request: Users vote for features

    One thing we always wonder when making a website for our users is "what feature do my users need the most?"

    I'm thinking about bringing a global poll system to this package.

    It would require a new table "kustomer_features_ideas" or something like that.

    Like in Facebook poll, users would be able to vote for an item in the list, or add a new item into the poll.

    That way you, as a webmaster, always have an updated list of the most wanted features from your users.

    I'll probably work on this first, because the Live Chat feature is too time consuming for me at the moment.

    Any feedback on this is most than welcome :)

    Cheers

    opened by mydnic 0
  • Feature Request: Live Chat

    Feature Request: Live Chat

    It would be nice to be able to have a live chat (if available) with the guest/user. Chat histories could be recorded for historical purposes. A guest could be tracked back to a session or IP address. A users (i.e. a registered user using say the Users model) attached to the Users's model.

    enhancement 
    opened by Braunson 0
Releases(v1.8.0)
Owner
Clément Rigo
Tech Lead // Project Manager // Laravel and VueJS Developer // Teacher // Consultant // Entrepreneur
Clément Rigo
cybercog 996 Dec 28, 2022
API Blueprint Renderer for Laravel, customizable via Blade templates

API Blueprint Renderer for Laravel This Laravel package Blueprint Docs renders your API Blueprint. It comes with a standard theme that you can customi

Michael Schmidt-Voigt 225 Sep 16, 2022
Fully customizable and tests supported Laravel admin dashboard for developers.

Laravel Admin dashboard Like Laravel Jetstream but built with Hotwire Turbo + additional perks. Tools used: tailwindcomponents/dashboard Hotwire Turbo

null 12 Nov 1, 2022
A BEAUTIFUL, RESPONSIVE, CUSTOMIZABLE, ACCESSIBLE (WAI-ARIA) REPLACEMENT FOR JAVASCRIPT'S POPUP BOXES FOR LARAVEL

A BEAUTIFUL, RESPONSIVE, CUSTOMIZABLE, ACCESSIBLE (WAI-ARIA) REPLACEMENT FOR JAVASCRIPT'S POPUP BOXES FOR LARAVEL Install To get started with SweetAle

Rashid Ali 939 Jan 8, 2023
An Easy, Customizable & Open Source Robux Rewards Website Made With Laravel

RbxDream - Robux Earning Rewards Website Coming Soon Current repo not stable. This is an open source Robux rewards site. Understanding Core Concepts T

Underground 3 Feb 15, 2022
Laravel Livewire full page component routing.

Laravel Livewire Routes Laravel Livewire full page component routing. This package allows you to specify routes directly inside your full page Livewir

null 22 Oct 6, 2022
Laravel Livewire form component with declarative Bootstrap 5 fields and buttons.

Laravel Livewire Forms Laravel Livewire form component with declarative Bootstrap 5 fields and buttons. Requirements Bootstrap 5 Installation composer

null 49 Oct 29, 2022
Laravel component to create gorgeous Charts.css charts.

Laravel component to create gorgeous Charts.css charts. This package will help you generate CSS only charts based on the Charts.css library. Installat

Maarten Paauw 105 Sep 26, 2022
Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.

About LivewireUI Spotlight LivewireUI Spotlight is a Livewire component that provides Spotlight/Alfred-like functionality to your Laravel application.

Livewire UI 792 Jan 3, 2023
Asset Component is a port of Laravel 3 Asset for Orchestra Platform.

Asset Component is a port of Laravel 3 Asset for Orchestra Platform. The component main functionality is to allow asset declaration to be handle dynamically and asset dependencies can be resolve directly from the container. It however is not intended to becoma an asset pipeline package for Laravel, for such purpose we would recommend to use Grunt or Gulp.

Orchestra Platform 54 Mar 31, 2022
A TALL-based Laravel Livewire component to replace the (multiple) select HTML input form with beautiful cards.

TALL multiselect cards A TALL-based Laravel Livewire component to replace the (multiple) select HTML input form with beautiful cards. Table of content

Frederic Habich 19 Dec 14, 2022
Laravel Composable View Composers Package - Compose View Composers from Component Composers

Laravel Virtuoso Laravel Composable View Composers Package Increase flexibility and reduce code duplication by easily composing complex View Composers

Yitzchok Willroth 68 Dec 29, 2021
Laravel Livewire component to show Events in a good looking monthly calendar

Livewire Calendar This package allows you to build a Livewire monthly calendar grid to show events for each day. Events can be loaded from within the

Andrés Santibáñez 680 Jan 4, 2023
Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.

About Wire Elements Spotlight Wire Elements Spotlight is a Livewire component that provides Spotlight/Alfred-like functionality to your Laravel applic

Wire Elements 790 Dec 27, 2022
A dynamic table component for Laravel Livewire - For Slack access, visit:

A dynamic Laravel Livewire component for data tables. Bootstrap 4 Demo | Bootstrap 5 Demo | Tailwind Demo | Demo Repository Installation You can insta

Anthony Rappa 1.3k Jan 1, 2023
Testbench Component is the de-facto package that has been designed to help you write tests for your Laravel package

Laravel Testing Helper for Packages Development Testbench Component is the de-facto package that has been designed to help you write tests for your La

Orchestra Platform 1.9k Dec 29, 2022
A dynamic Laravel Livewire component for multi steps form

Livewire component that provides you with a wizard that supports multiple steps form while maintaining state.

Vildan Bina 233 Jan 4, 2023
Emmet like Abbreviation to generate and wrap Laravel Blade Component with markup

Laravel Blade Emerald Emmet like Abbreviation to generate and wrap Laravel Blade Component with markup ?? Features Generate HTML in a Blade file via p

Aqua 32 Sep 6, 2022
An advanced datatable component for Laravel Livewire.

Livewire Smart Table An advanced, dynamic datatable component with pagination, sorting, and searching including json data. Installation You can instal

Turan Karatuğ 87 Oct 13, 2022