PHPackages                             tmkzmu/fortress - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. tmkzmu/fortress

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

tmkzmu/fortress
===============

Handle basic auth actions for API in Laravel applications

v1.0.5(4y ago)1159MITPHP

Since Mar 28Pushed 4y ago2 watchersCompare

[ Source](https://github.com/tmkzmu/fotress)[ Packagist](https://packagist.org/packages/tmkzmu/fortress)[ RSS](/packages/tmkzmu-fortress/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Fortress
========

[](#fortress)

[![PHP from Packagist](https://camo.githubusercontent.com/566a746c8dfe86123b6f8551b8b0e84f70026876bf33efe9db00914b30cdbffe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c61726176656c2f6c61726176656c3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/566a746c8dfe86123b6f8551b8b0e84f70026876bf33efe9db00914b30cdbffe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c61726176656c2f6c61726176656c3f7374796c653d666c61742d737175617265)[![Laravel version](https://camo.githubusercontent.com/ef3d05645794d1d091c3e8b00e18a0414d1edb3b23cc65cba16a685f7415d590/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d253345253344382e302d677265656e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/ef3d05645794d1d091c3e8b00e18a0414d1edb3b23cc65cba16a685f7415d590/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d253345253344382e302d677265656e3f7374796c653d666c61742d737175617265)

This package provides an easy elegant way to create all necessary endpoints for registration and authorization API for Laravel applications.

- user registration
- login
- email verification
- updates
- password reset

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

[](#installation)

#### Install package from composer:

[](#install-package-from-composer)

`composer require tmkzmu/fortress`

#### Publish Actions

[](#publish-actions)

`php artisan vendor:publish --provider="Tmkzmu\Fortress\FortressServiceProvider"`

This command will publish all Action classes to `app\Actions\Fortress` folder. There are several actions:

- `Register`
- `Login`
- `EmailVerification`
- `PasswordReset`
- `UpdatePassword`
- `UpdateProfile`

All of them have their own default logic. Rest (endpoints, controllers, migrations) are provided by the package.

#### Run migrations

[](#run-migrations)

Execute `php artisan migrate` to run migrations.

#### Add traits

[](#add-traits)

If you would like to use email verification add `Tmkzmu\Fortress\Traits\VerifyEmailTrait` trait and Laravel `MustVerifyEmail` interface to your `User` model.

Configuration
-------------

[](#configuration)

Configuration file (`fortress.php`) is stored in `config` folder.

There are several configurations:

- `features` - an array of turned-on actions.
- `controller_class` - a default Controller handling all requests. If you want to use your own controller, set the class name here and implement the interface `Tmkzmu\Fortress\Controllers\FortressControllerInterface`.
- `routes` - several configurations for routes:
    - `prefix` - define the prefix for routes (e.g. `api/v1`)
    - `middleware` - a middleware for all routes
    - `auth_middleware` - a middleware name to protect endpoints for authenticated users only
    - `throttle` - throttle requests for endpoints:
        - `login`
        - `email_verification`
        - `reset_password`
    - `paths` - an endpoint paths for Actions
- `auth`
    - `verification_expire` - the expiration time for mail verification URL
- `emails` - mail endpoints configuration
    - `callback_url` - an url for emails Actions
    - `email_verification_prefix` - a path for the email verification endpoint
    - `password_reset_prefix`- a path for the password reset endpoint

Tests
-----

[](#tests)

All endpoint are tested. You can use package tests by e.g. extend your test by class `Tmkzmu\Fortress\Feature\FortressTest`

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~4 days

Total

6

Last Release

1482d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/30274239?v=4)[Tomek Żmudziński](/maintainers/zmudzinski)[@zmudzinski](https://github.com/zmudzinski)

---

Top Contributors

[![tzmudzinski-ba](https://avatars.githubusercontent.com/u/148782064?v=4)](https://github.com/tzmudzinski-ba "tzmudzinski-ba (4 commits)")[![zmudzinski](https://avatars.githubusercontent.com/u/30274239?v=4)](https://github.com/zmudzinski "zmudzinski (4 commits)")

---

Tags

apiauthauthorizationemaillaravelloginpasswordregistrationresetupdateverification

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tmkzmu-fortress/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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