PHPackages                             kerigard/laravel-mix-token - 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. kerigard/laravel-mix-token

AbandonedArchivedLibrary

kerigard/laravel-mix-token
==========================

Tracking changes in files generated with Laravel Mix

v1.0.3(3y ago)012MITPHPPHP ^7.2|^8.0

Since Oct 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Kerigard/laravel-mix-token)[ Packagist](https://packagist.org/packages/kerigard/laravel-mix-token)[ RSS](/packages/kerigard-laravel-mix-token/feed)WikiDiscussions master Synced 1mo ago

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

LaravelMixToken
===============

[](#laravelmixtoken)

 [![Build Status](https://github.com/Kerigard/laravel-mix-token/workflows/tests/badge.svg)](https://github.com/Kerigard/laravel-mix-token/actions) [![Total Downloads](https://camo.githubusercontent.com/48f5c70ff7ab89ace1bed24b3ec916fc5d183915ddebdc56038c7fa8418a10d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4b657269676172642f6c61726176656c2d6d69782d746f6b656e)](https://packagist.org/packages/Kerigard/laravel-mix-token) [![Latest Stable Version](https://camo.githubusercontent.com/0038ace7e31cb41ac37e25a4e9c69ed20c72fb9fc61c7652239067d7bb228fae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4b657269676172642f6c61726176656c2d6d69782d746f6b656e)](https://packagist.org/packages/Kerigard/laravel-mix-token) [![License](https://camo.githubusercontent.com/9ad58983ce5ec501198751e19c2e0a153c096ac74ccff8d519771b6ddbb64d61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f4b657269676172642f6c61726176656c2d6d69782d746f6b656e)](https://packagist.org/packages/Kerigard/laravel-mix-token)

Tracking changes in files created with Laravel Mix for SPA applications.

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

[](#installation)

Via Composer

```
composer require kerigard/laravel-mix-token
```

Usage
-----

[](#usage)

You should add middleware to your `api` middleware group within your application's `app/Http/Kernel.php` file:

```
'api' => [
    \Kerigard\MixToken\SetMixHeader::class,
    'throttle:api',
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
],
```

Add token in an HTML `meta` tag:

```

```

To find out if there are changes, you need to add the `X-Requested-With` header to all requests to the server and check if there is a difference between the token in the `meta` tag and the `X-Mix-Token` header when answering.

```
import axios from 'axios'

const mixToken = document.head.querySelector('meta[name=mix-token]').content
const instance = axios.create({
  headers: { 'X-Requested-With': 'XMLHttpRequest' }
})

instance.interceptors.response.use(
  (response) => {
    if (response.headers['x-mix-token'] !== undefined && response.headers['x-mix-token'] != mixToken) {
      console.log('Mix manifest has been changed. Ask the user to refresh the page')
    }

    return response
  },
)
```

Change log
----------

[](#change-log)

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

License
-------

[](#license)

MIT. Please see the [LICENSE FILE](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Every ~102 days

Total

4

Last Release

1375d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bf41af862d8b4e4b8fee30d6a8a338395a39e303e2c04a8c9ec92d130db018f?d=identicon)[kerigard](/maintainers/kerigard)

---

Top Contributors

[![Kerigard](https://avatars.githubusercontent.com/u/46793484?v=4)](https://github.com/Kerigard "Kerigard (14 commits)")

---

Tags

laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kerigard-laravel-mix-token/health.svg)

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

PHPackages © 2026

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