PHPackages                             daikazu/simple-token-middleware - 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. daikazu/simple-token-middleware

ActiveLibrary

daikazu/simple-token-middleware
===============================

A simple token middleware

v1.0.0(7y ago)04MITPHPPHP &gt;=7.0

Since Mar 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/daikazu/simple-token-middleware)[ Packagist](https://packagist.org/packages/daikazu/simple-token-middleware)[ RSS](/packages/daikazu-simple-token-middleware/feed)WikiDiscussions master Synced 2mo ago

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

Simple Token Middleware
=======================

[](#simple-token-middleware)

[![Build Status](https://camo.githubusercontent.com/5533a0f462cc28d39b5f3c8d7a6b35736350b41172031ac12bf79f1c57c19dbe/68747470733a2f2f7472617669732d63692e636f6d2f4461696b617a752f73696d706c652d746f6b656e2d6d6964646c65776172652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Daikazu/simple-token-middleware)[![styleci](https://camo.githubusercontent.com/dcb8f88acc362aaedd26ca9a9a3f0152caf02726a78007fcf3e68c73125278b8/68747470733a2f2f7374796c6563692e696f2f7265706f732f3137363339383931342f736869656c64)](https://styleci.io/repos/176398914)

[![Packagist](https://camo.githubusercontent.com/9dde82ac284abdad9e1d4e565ad9b0574d7c71cdb5b443be7ad4e1a8a19f9d2d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6461696b617a752f73696d706c652d746f6b656e2d6d6964646c65776172652e737667)](https://packagist.org/packages/daikazu/simple-token-middleware)[![Packagist](https://camo.githubusercontent.com/2f65ad43b73b41f8de5e4d1644373641fb4ff564cbe1cf0c293c0c62b01a8b69/68747470733a2f2f706f7365722e707567782e6f72672f6461696b617a752f73696d706c652d746f6b656e2d6d6964646c65776172652f642f746f74616c2e737667)](https://packagist.org/packages/daikazu/simple-token-middleware)[![Packagist](https://camo.githubusercontent.com/f1faacf4384cf913995cc5804218fd626954a45c30d294523d558d42ce41cf0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6461696b617a752f73696d706c652d746f6b656e2d6d6964646c65776172652e737667)](https://packagist.org/packages/daikazu/simple-token-middleware)

Small package to quickly add custom middleware to your laravel app to easily restrict access to your routes.

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

[](#installation)

Install via composer

```
composer require daikazu/simple-token-middleware
```

### Register Service Provider

[](#register-service-provider)

**Note! This and next step are optional if you use laravel&gt;=5.5 with package auto discovery feature.**

Add service provider to `config/app.php` in `providers` section

```
Daikazu\SimpleTokenMiddleware\ServiceProvider::class,
```

### Register Facade

[](#register-facade)

Register package facade in `config/app.php` in `aliases` section

```
Daikazu\SimpleTokenMiddleware\Facades\SimpleTokenMiddleware::class,
```

### Publish Configuration File

[](#publish-configuration-file)

```
php artisan vendor:publish --provider="Daikazu\SimpleTokenMiddleware\ServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Add `SIMPLE_TOKEN=my_secret_token` to your `.env` file,

use the middleware name `simple.token` in your route assignment.

```
Route::post('/api/my-protected-route', 'Controller@index')->middleware('simple.token');
```

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [](https://github.com/daikazu/simple-token-middleware)
- [All contributors](https://github.com/daikazu/simple-token-middleware/graphs/contributors)

This package is bootstrapped with the help of [melihovv/laravel-package-generator](https://github.com/melihovv/laravel-package-generator).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

2609d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00a5aa701f964455918b2e454e7b460fe2ef729639337a059d5bac12e162027e?d=identicon)[daikazu](/maintainers/daikazu)

---

Top Contributors

[![daikazu](https://avatars.githubusercontent.com/u/4039367?v=4)](https://github.com/daikazu "daikazu (7 commits)")

---

Tags

middlewaretoken

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/daikazu-simple-token-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/daikazu-simple-token-middleware/health.svg)](https://phpackages.com/packages/daikazu-simple-token-middleware)
```

###  Alternatives

[dyorg/slim-token-authentication

Slim 3.0+ Token Authentication Middleware

78106.5k](/packages/dyorg-slim-token-authentication)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[erjanmx/laravel-api-auth

Dead simple Laravel api authorization middleware

2024.5k](/packages/erjanmx-laravel-api-auth)

PHPackages © 2026

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