A tawk.to chat widget for Laravel.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 0b33798 Aug 8, 2018
Permalink
Failed to load latest commit information.
src v1.0.0 Jul 29, 2018
.gitignore v1.0.0 Jul 29, 2018
LICENSE v1.0.0 Jul 29, 2018
README.md v1.0.0 Aug 8, 2018
composer.json v1.0.0 Jul 29, 2018

README.md

tawk.to for Laravel

tawk.to has dozens of integrations, but not for Laravel. This is a tawk.to chat widget for Laravel.

tawk-laravel

Usage

Just echo the widget code in your app layout blade inside the body tag:

        ...
        {{ TawkTo::widgetCode() }}
    </body>
</html>

Installation

Install from command line:

composer require emotality/tawk-laravel

Laravel 5.5+ will use the auto-discovery function but for Laravel 5.4 and lower, you will need to include the service providers & facade manually in config/app.php:

'providers' => [
    ...,
    Emotality\TawkTo\TawkToServiceProvider::class,
];

...

'aliases' => [
    ...,
    'TawkTo' => Emotality\TawkTo\Facades\TawkTo::class,
];

Config

Copy the default config file:

php artisan vendor:publish --provider="Emotality\TawkTo\TawkToServiceProvider"

Open .env and set your API key:

TAWKTO_API_KEY=54f52bfdf7bcaa72719c6b7

Get your API key from the Direct Chat Link text field from the dashboard following these steps.

License

tawk-laravel is released under the MIT license. See LICENSE for details.