PHPackages                             kalizi/laravel-spyhole - 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. kalizi/laravel-spyhole

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

kalizi/laravel-spyhole
======================

Laravel package to record and re-watch user sessions

v1.0-beta(5y ago)6522MITPHPPHP ^7.3|^8.0

Since Feb 7Pushed 5y ago2 watchersCompare

[ Source](https://github.com/kalizi/laravel-spyhole)[ Packagist](https://packagist.org/packages/kalizi/laravel-spyhole)[ Docs](https://github.com/kalizi/laravel-spyhole)[ RSS](/packages/kalizi-laravel-spyhole/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

 [![](https://camo.githubusercontent.com/88c62e15c8a8dd2d8eb80c18c9b06d1508db94889fb90d2a3706be739a213190/68747470733a2f2f6b616c697a692e6465762f737079686f6c655f6c6f676f2e706e67)](https://camo.githubusercontent.com/88c62e15c8a8dd2d8eb80c18c9b06d1508db94889fb90d2a3706be739a213190/68747470733a2f2f6b616c697a692e6465762f737079686f6c655f6c6f676f2e706e67)

 [![Total Downloads](https://camo.githubusercontent.com/6cd0c8f64e38d57a5d375460fdc858d6a4911108441e45b52f5d049e28fa4f5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b616c697a692f6c61726176656c2d737079686f6c65)](https://packagist.org/packages/kalizi/laravel-spyhole) [![Latest Stable Version](https://camo.githubusercontent.com/d5d47aa16ddc9dc50493800e43004866c629d1e56e0148ae6ee867d512678e19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b616c697a692f6c61726176656c2d737079686f6c65)](https://packagist.org/packages/kalizi/laravel-spyhole) [![License](https://camo.githubusercontent.com/e8c8d7b26aa2525f5f9ba9a74ebd2eabe2e8d7bb09243a3b944e464791d20ccb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b616c697a692f6c61726176656c2d737079686f6c65)](https://packagist.org/packages/kalizi/laravel-spyhole) [![Quality Score](https://camo.githubusercontent.com/7382ad91547c7b9b01f2f7388b9322e3b1973f9cd4aef82f974a0ea54c27ee42/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b616c697a692f6c61726176656c2d737079686f6c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kalizi/laravel-spyhole) [![Build Status](https://camo.githubusercontent.com/ced59d6eb397ed7bdd4fa8aef3ed27ec07204f68ffc11809ac0b670715a7c5a3/68747470733a2f2f6170692e7472617669732d63692e636f6d2f6b616c697a692f6c61726176656c2d737079686f6c652e7376673f6272616e63683d6d61696e267374617475733d706173736564)](https://travis-ci.com/kalizi/laravel-spyhole)

Laravel Spyhole is a user session recorder for the Laravel Framework. Laravel Spyhole is a wrapper for the JS Library [RRWeb](https://www.rrweb.io/) (Record and replay the web). It allows a simple way to embed the Recorder into your views and start recordings out-of-the-box.

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

[](#installation)

You can install the package via composer:

```
composer require kalizi/laravel-spyhole
```

Usage
-----

[](#usage)

After installation publish the config file:

```
php artisan vendor:publish --provider="Kalizi\LaravelSpyhole\LaravelSpyholeServiceProvider"
```

In the configuration file you can set:

- **Session ID tracking**: this will make the package track the session ID from the Laravel built-in Session, if set to false, a random UUID will be generated for the user session.
- **User ID tracking**: this will make the package track the user ID with recordings.
- **Minimum sampling rate**: the minimum number of records to be recorded from frontend before sending. (Default: 50)

Finally, to start recording, just embed the recorder view to the view you want to record.

```
@include("laravel-spyhole::embed_spyhole")
```

### How it works in short

[](#how-it-works-in-short)

As pointed before, spyhole uses RRWeb as its internal recorder.

In the `resources/assets` folder there are the published assets where you can find the RRWeb files and the built version of `recording-handler.js`, a JS script handling the RRWeb initialization and recording sendings.

The recordings are posted to a route named `spyhole.store-entry` (whose URL is `/spyhole-api/record`). Recordings are accessible via the model `Kalizi\LaravelSpyhole\Models\SessionRecording` with properties: ID, path, recordings (an array stored gzipped and base 64 encoded) and user ID.

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Andrea Bondì](https://github.com/kalizi)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1920d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e72f82d5db5ca47f13171b3a8f6e46ef3377bf9b941d8f002bb87fa09c1bcebc?d=identicon)[kalizi](/maintainers/kalizi)

---

Top Contributors

[![kalizi](https://avatars.githubusercontent.com/u/13708517?v=4)](https://github.com/kalizi "kalizi (6 commits)")

---

Tags

kalizilaravel-spyhole

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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