creacoon / laravel-dashboard-helpscout-tile
helpdesk tile for spatie/laravel-dashboard
Requires
- php: ^7.4|^8.0
- helpscout/api: ^3.0
- nesbot/carbon: ^2.42.0
- spatie/laravel-dashboard: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.3
README
This tile displays the amount of active tickets, pending tickets and the amount of tickets that have been solved today.
This tile can be used on the Laravel Dashboard.
Screenshots
The background color of the open ticket count becomes brighter red when there are more open tickets.
Installation
- Require the package via composer
- Place all the necessary information in the config file, use the template below. ('app_id', 'app_secret' and 'mailboxes' are necessary. The others are optional.) (read https://developer.helpscout.com/docs-api/ for information about generating api keys)
- Place the tile component in your dashboard. Fill in the
mailboxId
in the tag. - Schedule the command in the kernel.php.
Composer
You can install the package via composer:
composer require creacoon/laravel-dashboard-helpscout-tile
Config file
In the dashboard
config file, you must add this configuration in the tiles
key. The mailboxes
should contain an array of mailbox id's that you want to use on the dashboard.
// in config/dashboard.php return [ // ... 'tiles' => [ 'helpscout' => [ 'app_id' => env('HELPSCOUT_APP_ID'), 'app_secret' => env('HELPSCOUT_APP_SECRET'), 'mailboxes' => explode(',', env('HELPSCOUT_MAILBOXES')), 'active_tickets_full_alert' => 10, 'refresh_interval_in_seconds' => 60, 'no_active_tickets_text' => 'There are no tickets!', ] ], ];
Tile component
In your dashboard view you use the livewire:helpscout-tile
component.
<x-dashboard> <livewire:helpscout-tile position="e7:e16" mailboxId="123456"/> </x-dashboard>
Schedule command
In app\Console\Kernel.php
you should schedule the following commands.
protected function schedule(Schedule $schedule) { // ... $schedule->command(FetchDataFromHelpscoutCommand::class)->everyFiveMinutes(); }
Customizing the view
If you want to customize the view used to render this tile, run this command:
php artisan vendor:publish --tag="dashboard-helpscout-tile-views"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email support@creacoon.nl instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.