statview/satellite

There is no license information available for the latest version (2.1.0) of this package.

Satellite package for Statview

Maintainers

Package info

github.com/statview-app/satellite

pkg:composer/statview/satellite

Statistics

Installs: 4 300

Dependents: 1

Suggesters: 0

Stars: 1

Open Issues: 0

2.1.0 2026-06-15 12:05 UTC

This package is auto-updated.

Last update: 2026-06-15 12:06:37 UTC


README

The package that sets up the communication channel for Statview. More information at https://statview.app.

Requirements

  • PHP 8.2+
  • Laravel 11, 12 or 13

Installation

Composer require

composer require statview/satellite

Publishing the config

php artisan vendor:publish --tag="statview-config"

Adding environment variables

You can get the variable data during the project setup at Statview.

STATVIEW_DSN=

The DSN contains your endpoint, project id and API key. The package parses it automatically, so setting STATVIEW_DSN is all you need for a default setup.

Optional environment variables

# Override the Statview endpoint (defaults to https://statview.app)
STATVIEW_ENDPOINT=

# Disable SSL verification for outgoing calls (defaults to true)
STATVIEW_VERIFY_SSL=false

# Restrict the satellite routes to a domain
STATVIEW_DOMAIN=

# Change the route prefix (defaults to statview/satellite)
STATVIEW_PATH=

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 them in a Service Provider.

use Statview\Satellite\Statview;
use Statview\Satellite\Widgets\Widget;

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()),
        ];
    });
}

Chart widgets

Use ChartWidget to push chart data instead of a single value.

use Statview\Satellite\Widgets\ChartWidget;

ChartWidget::make('signups')
    ->title('Signups')
    ->type('line') // Defaults to line
    ->data([
        ['label' => 'Jan', 'value' => 12],
        ['label' => 'Feb', 'value' => 30],
    ]);

Testing your widgets

You can preview the registered widgets and their resolved values from the command line.

php artisan statview:test-widgets

Post messages to your timeline

Posting messages to your timeline is very easy. The Satellite package has everything built-in to start posting to your timeline.

use Statview\Satellite\Statview;
use Statview\Satellite\Enums\PostType;

Statview::postToTimeline(
    title: 'Houston, we have a problem',
    body: 'There is a problem with renewing subscriptions.',
    type: PostType::Danger, // Defaults to PostType::Default
    icon: '🚨', // Expects emoji string - defaults to the icon of the given type
);

The available types are PostType::Default, PostType::Info, PostType::Danger, PostType::Warning and PostType::Success. Each type has a default icon, which is used when you don't pass one yourself.

Adding actions to a timeline message

You can attach actions (links) to a timeline message.

use Statview\Satellite\Statview;
use Statview\Satellite\Enums\PostType;
use Statview\Satellite\Widgets\Action;

Statview::postToTimeline(
    title: 'New signup',
    body: 'A new customer just signed up.',
    type: PostType::Success,
    actions: [
        Action::make()
            ->label('View customer')
            ->icon('👤')
            ->url('https://example.com/customers/1'),
    ],
);

Gauges

Increment or decrement a gauge by tag.

use function Statview\gauge;

gauge()->increment('active_subscriptions');
gauge()->decrement('active_subscriptions', 2);

Announcements

Fetch the announcements configured in your Statview panel.

use Statview\Satellite\Statview;

$announcements = Statview::getAnnouncements();

Support

Send us an email at support[at]statview.app. We are happy to help.