kilobyteno / laravel-dashboard-plausible-tile
A simple tile for showing Plausible analytics within for your dashboard.
Requires
- php: ^8.0|^8.1|^8.2
- kilobyteno/laravel-plausible: ^1.1
- spatie/laravel-dashboard: ^2.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- livewire/livewire: ^2.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
README
A simple tile for showing Plausible analytics within for your dashboard.
This tile can be used on the Laravel Dashboard.
Installation
You can install the package via composer:
composer require kilobyteno/laravel-dashboard-plausible-tile
Publish config for laravel-plausible:
php artisan vendor:publish --tag="plausible-config"
Open config/plausible.php
and add your Plausible API Key.
Then add this to config/dashboard.php
under the tile
key:
'plausible' => [ 'refresh_interval_in_seconds' => 60, 'domains' => [ 'kilobyte.no', 'example.com', ], ],
Under "schedule" in kernel.php
add:
$schedule->command(FetchDataFromPlausibleCommand::class)->everyMinute();
Usage
In your dashboard view you use the livewire:plausible-tile
component.
<x-dashboard> <livewire:plausible-tile position="a1:a8" /> </x-dashboard>
Customizing the view
If you want to customize the view used to render this tile, run this command:
php artisan vendor:publish --provider="Kilobyteno\PlausibleTile\PlausibleTileServiceProvider" --tag="dashboard-plausible-tile-views"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.