---
title: "Without the facade — Plausible for Laravel | Roundly"
description: "Skip the facade: inject PlausibleManager or call the plausible() helper — and why there are resource clients instead of actions."
url: https://roundly-consulting.com/open-source/docs/plausible-for-laravel/without-facade
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Plausible for Laravel](https://roundly-consulting.com/open-source/docs/plausible-for-laravel.md)

# Without the facade

The facade is the recommended default, not the only way in. It is sugar over RoundlyConsulting\\Plausible\\PlausibleManager — the facade root, bound as a container singleton. Inject the manager through the constructor for the same API as an explicit dependency with no static calls, or call the plausible() helper, which returns the same instance:

```php
use RoundlyConsulting\Plausible\PlausibleManager;

final class DashboardController
{
    public function __construct(private PlausibleManager $plausible) {}

    public function __invoke()
    {
        return $this->plausible->stats()->for('my-site.com')->last30Days()->aggregate();
    }
}

plausible()->sites()->list();   // the helper returns the same singleton
```

## Resource clients instead of actions

Plausible is a remote API, so there are no action classes: each area is a resource client resolved from the container, which you can also inject or rebind directly:

| Facade method | Resource client | Covers |
| --- | --- | --- |
| `stats()` | `Repositories\StatsRepository` | Fluent builder, explicit requests, Stats v2 run(). |
| `events()` | `Repositories\EventsRepository` | Pageviews, custom events, queued and batched capture. |
| `sites()` | `Repositories\SitesRepository` | create, get, list, update, delete. |
| `goals()` | `Repositories\GoalsRepository` | create, list, delete. |
| `sharedLinks()` | `Repositories\SharedLinksRepository` | create, createFrom. |

Plausible::fake() replaces the manager behind the facade and in the container, so an injected PlausibleManager and plausible() are recorded too. Go through the manager when you want a call to show up in the fake’s assertions.

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/plausible-for-laravel.md)
