statview / satellite
Satellite package for Statview
Installs: 1 505
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- illuminate/contracts: ^9.0 || ^10.0 || ^11.0
- symfony/process: ^6.0 || ^7.1.5
Requires (Dev)
- orchestra/testbench: ^8.0.10
- pestphp/pest: ^2.9
- pestphp/pest-plugin-laravel: ^2.0
- spatie/laravel-ray: ^1.32.4
README
The package that setups the communication channel for Statview. More information at https://statview.app.
Installation
Composer require
composer require statview/satellite
Publishing vendor
php artisan vendor:publish --tag="statview-config"
Adding environment variables
You can get the variable data during the project setup at Statview.
STATVIEW_DSN=
Maintenance mode
You need to make an exception for Statview to access your app during maintenance mode if you want to turn off maintenance mode from your Statview panel.
Add statview to the $except
array of your PreventRequestsDuringMaintenance
middleware.
/** * The URIs that should be reachable while maintenance mode is enabled. * * @var array<int, string> */ protected $except = [ '/statview/*' ];
Usage
Provide data for widgets
You can register your widgets by adding it to a Service Provider.
use Statview\Satellite\Statview; public function boot() { Statview::registerWidgets(function () { return [ Widget::make('total_users') ->title('Total users') ->value(User::count()) ->description('All the users since start of the project'), Widget::make('total_teams') ->title('Total teams') ->value(Team::count()), Widget::make('total_projects') ->title('Total projects') ->value(Project::count()), ]; }); }
Post messages to your timeline
Posting messages to your timeline is very easy. The Satellite package has everything build-in to start posting to your timeline.
use Statview\Satellite\Statview; Statview::postToTimeline( title: 'Houston, we have a problem', body: 'There is a problem with renewing subscriptions.', type: 'danger' // Defaults to info, icon: '🚨' // Expects emoji string - defaults to 📣, );
Support
Send us and email at support[at]statview.app. We are happy to help.