1. Go to this page and download the library: Download statview/satellite library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
statview / satellite example snippets
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array<int, string>
*/
protected $except = [
'/statview/*'
];
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()),
];
});
}
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 📣,
);