All Projects → mydnic → Laravel Feedback Component

mydnic / Laravel Feedback Component

Licence: mit
Customizable Feedback Component for Laravel

Projects that are alternatives of or similar to Laravel Feedback Component

Chat
A Laravel chat package. You can use this package to create a chat/messaging Laravel application.
Stars: ✭ 710 (+228.7%)
Mutual labels:  laravel, chat
Mercurius
Real-time Messenger for Laravel
Stars: ✭ 309 (+43.06%)
Mutual labels:  laravel, chat
Laravel Video Chat
Laravel Video Chat using Socket.IO and WebRTC
Stars: ✭ 646 (+199.07%)
Mutual labels:  laravel, chat
Chatify
A Laravel package that allows you to add a complete user messaging system into your new/existing Laravel application.
Stars: ✭ 885 (+309.72%)
Mutual labels:  laravel, chat
Pusher Chatkit Laravel
Laravel wrapper for the Chatkit PHP SDK. ChatKit is shutting down 😕 - https://blog.pusher.com/narrowing-our-product-focus
Stars: ✭ 21 (-90.28%)
Mutual labels:  laravel, chat
Laravel 5 Messenger
A Simple Laravel 5, 6, 7 & 8 Messenger with Pusher Capabilities
Stars: ✭ 75 (-65.28%)
Mutual labels:  laravel, chat
Chat Demo
Demo Application for https://github.com/musonza/chat/
Stars: ✭ 67 (-68.98%)
Mutual labels:  laravel, chat
Addchat Laravel
AddChat Laravel is a Laravel chat package. Live chat widget for Laravel that also includes multi-user chat, group permissions, customer support chat & more.
Stars: ✭ 99 (-54.17%)
Mutual labels:  laravel, chat
React Native Chatbot
💬 Easy way to create conversation chats
Stars: ✭ 212 (-1.85%)
Mutual labels:  chat
Speedtest Tracker
Continuously track your internet speed
Stars: ✭ 209 (-3.24%)
Mutual labels:  laravel
Blog
Hi, I am CrazyCodes, and here are all my articles
Stars: ✭ 212 (-1.85%)
Mutual labels:  laravel
Twitch4j
Modular Async/Sync/Reactive Twitch API Client / IRC Client
Stars: ✭ 209 (-3.24%)
Mutual labels:  chat
Laravel Multisite
Multiple sites on one codebase
Stars: ✭ 214 (-0.93%)
Mutual labels:  laravel
Chatview
This is an Android library which can be used to add chat functionality to your android application with just a few lines of code.
Stars: ✭ 211 (-2.31%)
Mutual labels:  chat
Laravel Slack Slash Command
Make a Laravel app respond to a slash command from Slack
Stars: ✭ 215 (-0.46%)
Mutual labels:  laravel
React Native Typing Animation
💬 A typing animation for your React Native chat app based on simple trigonometry to create better loaders.
Stars: ✭ 211 (-2.31%)
Mutual labels:  chat
Client
一叶客户端源代码
Stars: ✭ 212 (-1.85%)
Mutual labels:  chat
Lasso
Lasso is a Laravel package created to make your deployments blazing fast.
Stars: ✭ 217 (+0.46%)
Mutual labels:  laravel
Orbit Web
Orbit Web Application
Stars: ✭ 215 (-0.46%)
Mutual labels:  chat
Laravel Pagseguro
Checkout Transparente e Pagamentos Recorrentes (Assinaturas)
Stars: ✭ 213 (-1.39%)
Mutual labels:  laravel

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 :

<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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].