Integrate Tawk.to into yoru Laravel and Nova apps.
genealabs/laravel-tawk is a Laravel package for integrate tawk.to into yoru laravel and nova apps..
It currently has 11 GitHub stars and 1.238 downloads on Packagist (latest version 13.0.0).
Install it with composer require genealabs/laravel-tawk.
Discover more Laravel packages by genealabs
or browse all Laravel packages to compare alternatives.
Last updated
Easily and quickly integrate Tawk.to LiveChat into your laravel app in under 5 minutes!
| PHP | Laravel | |-----|---------| | 8.2 | 8.x – 13.x | | 8.3 | 8.x – 13.x | | 8.4 | 8.x – 13.x | | 8.5 | 8.x – 13.x |
composer require "genealabs/laravel-tawk:*"
Refer to the Property Settings page in your Tawk.to dashboard for the required
values. Add the following to your .env file:
TAWK_API_KEY=xxxxxxxxxxxxxxx
TAWK_SITE_ID=yyyyyyyyyyyyyyy
Add the following to your layout blade template immediately before the closing
</body> tag:
@tawk
// </body>
// </html>
If you are using Laravel Nova as a dashboard for your users, first publish the
layout blade template, then insert the blade directive immediate prior to the
closing </body> tag in resources/views/vendor/nova/layout.blade.php:
@tawk
// </body>
// </html>
.env values: Ensure TAWK_SITE_ID and TAWK_API_KEY are set correctly. You can find these in your Tawk.to dashboard under Property Settings.php artisan config:clear after updating .env.@tawk directive may not be in your layout. If it shows a comment about missing TAWK_SITE_ID, update your .env.@tawk directive must be placed immediately before the closing </body> tag in your layout blade template.To automatically send the visitor's browser console output (errors, warnings, logs) to Tawk.to when a chat starts, add the following to your .env:
TAWK_CAPTURE_CONSOLE=true
When enabled, the last 50 console entries are captured and sent as custom attributes when a visitor initiates a chat. This includes:
The data appears in the Tawk.to agent dashboard as custom visitor attributes.
To automatically take a screenshot of the page when a visitor starts a chat, add the following to your .env:
TAWK_CAPTURE_SCREENSHOT=true
When enabled, html2canvas (loaded from CDN) captures the visible page and sends it as a Tawk.to custom attribute. The screenshot appears in the agent dashboard as a base64 JPEG image.
Note: Screenshots are compressed (50% scale, 60% JPEG quality) to stay within Tawk.to's attribute size limits. Very large pages may exceed the limit and the screenshot will be skipped.