PHPackages                             vask/laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vask/laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vask/laravel
============

Pusher-compatible websockets powered by vask.dev

0.1.0(4w ago)5222↓54.5%[4 PRs](https://github.com/vask-dev/laravel/pulls)MITPHPPHP ^8.2CI passing

Since May 12Pushed 4w agoCompare

[ Source](https://github.com/vask-dev/laravel)[ Packagist](https://packagist.org/packages/vask/laravel)[ Docs](https://github.com/vask-dev/laravel)[ RSS](/packages/vask-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (18)Versions (17)Used By (0)

Vask for Laravel
================

[](#vask-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c7364d330cbfb13b6098f8b551c27443e160ed8f12568fa721c303c6f4f898dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7661736b2f6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vask/laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3a470a1137ddd141ad6d438033fb7b9002948fc63ce184a4fdcf1ecfcc4baa21/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7661736b2d6465762f6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/vask-dev/laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9c81edb286a63d14db43918c3d8c0ad434abdc4938f016cff55d16e23d420ee5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7661736b2d6465762f6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/vask-dev/laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ad73241ffdd8b1a4620015dabf2e9b0f929e861e46981c5b2b2569efce34f4d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7661736b2f6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vask/laravel)

Drop-in Laravel integration for [Vask](https://vask.dev), Pusher-compatible WebSockets running on Cloudflare. Run `php artisan vask:install` to OAuth into your account, write `PUSHER_*` credentials to `.env`, and verify the connection in one go. The package also ships a webhook handler for channel, presence, and client events, a `vask:doctor` diagnostic command, and a local-only `/_vask/demo` page that proves the round-trip end-to-end.

Installation
------------

[](#installation)

```
composer require vask/laravel
```

Sign up (or sign in) and wire credentials into `.env` in one command:

```
php artisan vask:install
```

This kicks off an OAuth device flow. You'll be shown a URL and a short code to approve in your browser. Once approved, the command writes `PUSHER_*` credentials to `.env` and runs `vask:doctor` to confirm the configuration. No git config or local tokens are used to authenticate.

If you need to verify an existing setup at any time:

```
php artisan vask:doctor
php artisan vask:doctor --no-ping --no-broadcast   # skip the live network checks
```

### Try it in the browser

[](#try-it-in-the-browser)

After `vask:install`, start your dev server and visit `/_vask/demo`. It's a local-only page that subscribes to a private channel and lets you click emoji to broadcast them, both via the server (POST to Laravel) and as Pusher client events straight from the browser. It exercises the full round-trip (Laravel to Vask to browser) and shows you the latency, so you can confirm both your server credentials and the WebSocket leg without writing a single line of frontend code.

The demo route is only registered when `app()->environment() === 'local'`. To turn it off entirely, set `VASK_NO_DEMO=true` in your `.env`.

Usage
-----

[](#usage)

Vask is a drop-in Pusher replacement, so use Laravel's standard broadcasting:

```
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;

class OrderShipped implements ShouldBroadcast
{
    public function broadcastOn(): PrivateChannel
    {
        return new PrivateChannel('orders.'.$this->order->id);
    }
}
```

### Webhooks

[](#webhooks)

Register handlers in a service provider. The package auto-registers `POST /webhooks/vask` the first time it sees a handler. No handler, no route:

```
use Vask\Laravel\Facades\Vask;
use Vask\Laravel\Webhooks\Payloads\ChannelOccupiedPayload;

public function boot(): void
{
    Vask::onChannelOccupied(fn (ChannelOccupiedPayload $event) => /* ... */);
    Vask::onMemberAdded([MemberHandler::class, 'joined']);
    Vask::onClientEvent(LogClientEvent::class); // invokable class
}
```

The route is registered outside the `web` middleware group, so CSRF doesn't apply. To customise: `Vask::webhookPath('/api/vask-hooks')` or `Vask::disableAutoWebhookRoute()` to register your own.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ashley Hindle](https://github.com/ashleyhindle)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance94

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

11

Last Release

28d ago

PHP version history (2 changes)0.0.7PHP ^8.1

0.0.14PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/454975?v=4)[Ashley Hindle](/maintainers/ashleyhindle)[@ashleyhindle](https://github.com/ashleyhindle)

---

Top Contributors

[![ashleyhindle](https://avatars.githubusercontent.com/u/454975?v=4)](https://github.com/ashleyhindle "ashleyhindle (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelWebSocketsvask

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vask-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/vask-laravel/health.svg)](https://phpackages.com/packages/vask-laravel)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k33.0M871](/packages/spatie-laravel-data)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M41](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

327482.0k25](/packages/codewithdennis-filament-select-tree)[nativephp/desktop

NativePHP for Desktop

37833.6k8](/packages/nativephp-desktop)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124581.3k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
