PHPackages                             imanghafoori/laravel-anypass - 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. imanghafoori/laravel-anypass

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

imanghafoori/laravel-anypass
============================

A minimal yet powerful package to help you in development.

v1.0.12(1y ago)21421.6k—3.3%15[2 PRs](https://github.com/imanghafoori1/laravel-anypass/pulls)MITPHPPHP ^7.1.3|7.2.\*|7.3.\*|7.4.\*|8.\*CI failing

Since May 16Pushed 1y ago7 watchersCompare

[ Source](https://github.com/imanghafoori1/laravel-anypass)[ Packagist](https://packagist.org/packages/imanghafoori/laravel-anypass)[ Docs](https://github.com/imanghafoori1/laravel-anypass)[ RSS](/packages/imanghafoori-laravel-anypass/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (12)Used By (0)

Laravel Anypass
===============

[](#laravel-anypass)

[![anypass_header](https://user-images.githubusercontent.com/6961695/40175717-4fa063de-59ee-11e8-8124-fbb53c8ba653.png)](https://user-images.githubusercontent.com/6961695/40175717-4fa063de-59ee-11e8-8124-fbb53c8ba653.png)

[![Latest Stable Version](https://camo.githubusercontent.com/0d1540daf722847b9bfff4f27fa9cdd9a4f4a84321377813b0698da7e46a272a/68747470733a2f2f706f7365722e707567782e6f72672f696d616e676861666f6f72692f6c61726176656c2d616e79706173732f762f737461626c65)](https://packagist.org/packages/imanghafoori/laravel-anypass)[![Quality Score](https://camo.githubusercontent.com/cac16cb31d36ccbde9dac999d1618dcf1fbcfe00835afa0c1c36876d1a831954/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696d616e676861666f6f7269312f6c61726176656c2d616e79706173732e7376673f7374796c653d726f756e642d737175617265)](https://scrutinizer-ci.com/g/imanghafoori1/laravel-anypass)[![Build Status](https://camo.githubusercontent.com/bb7328bcd19ff58f751b6672e754c18f2981c43be9f34385422a3e4d775ba811/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f696d616e676861666f6f7269312f6c61726176656c2d616e79706173732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/imanghafoori1/laravel-anypass/build-status/master)[![License](https://camo.githubusercontent.com/296d794a13929765ea03e0caa15fccd7d4a962c763027be46aea9c076d278084/68747470733a2f2f706f7365722e707567782e6f72672f696d616e676861666f6f72692f6c61726176656c2d616e79706173732f6c6963656e7365)](https://packagist.org/packages/imanghafoori/laravel-anypass)[![Check Imports](https://github.com/imanghafoori1/laravel-anypass/actions/workflows/check_import.yml/badge.svg?branch=master)](https://github.com/imanghafoori1/laravel-anypass/actions/workflows/check_import.yml)[![StyleCI](https://camo.githubusercontent.com/8f04b94423de5448631d559f372314a563aa87769d5b7110c12a2764207e22a4/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3133323235373234342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/132257244)

### Built with ❤️ for every "lazy" laravel developer ;)

[](#built-with-heart-for-every-lazy-laravel-developer-)

It is always painful to remember and type in the correct password in the login form while you are in development...

It would be nice to be able to login with any password in local environment and only by changing the .env variables(not the application code), switch to: "real password checking".

(This means you do not need to change your application code, when you deploy your app to production while you enjoy the ease in local environments.)

Actually the behaviour of the `auth()->attempt($credentials); ` simply changes based on the config variable in the auth.php and .env file!

#### Performance hit:

[](#performance-hit)

This package is only a few lines (about 20 lines) of code with almost no overhead.

It is also completely safe to avoid installing it on production without changing your code. Since it is a dev only dependency in your composer.json file.

```
  "require-dev": {
       "imanghafoori/laravel-anypass": "dev-master",
        ...
  },
```

Config
------

[](#config)

To avoid accidental security vulnerabilities, 3 conditions should match before you can login with any password :

in your .env file you must:

```
1 - APP_ENV=local  // or APP_ENV=testing
2 - APP_DEBUG=true
3 - ANY_PASS=true
4 - WRONG_ANY_PASS=wrong // any password is correct except this one.

```

That way it is very unlikely to accidentally misconfigure your app to accept any wrong password on production server.

We highly recommend to take a look to the source code.

By default, Anypass will only work if the `APP_ENV` is set to local or testing. You can override this by defining `ANY_PASS_ENVIRONMENTS` in your .env file, and setting the value to a comma-separated string of environments. For example:

```
ANY_PASS=true
ANY_PASS_ENVIRONMENTS="local,testing,acceptance"

```

- If you want to manually check the login form behaivour in case of a wrong password in local you can use the "1\_Wrong\_pass" string. (you CAN enter it in lowercase or uppercase and a combination of both like "1\_WrOnG\_Pass", and it would be considered as a wrong password.)

💓 Note
------

[](#heartbeat-note)

You can not login with an invalid username or an invalid api token. Only the password checking is by-passed.

🔥 Installation
--------------

[](#fire-installation)

```
composer require --dev imanghafoori/laravel-anypass

```

(For laravel 5.4 and below: Instead of adding the service provider in the config/app.php file, you can add the following code to your app/Providers/AppServiceProvider.php file, within the register() method:

```
public function register()
{
    if ($this->app->environment() === 'local' || $this->app->environment() === 'testing') {
        $this->app->register(\Imanghafoori\AnyPass\AnyPassServiceProvider::class);
    }
    // ...
}
```

### ❗ Security

[](#exclamation-security)

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

### ⭐ Your Stars Make Us Do More ⭐

[](#star-your-stars-make-us-do-more-star)

As always if you found this package useful and you want to encourage us to maintain and work on it, Please press the star button to declare your willing.

More from the author:
=====================

[](#more-from-the-author)

### Laravel Terminator

[](#laravel-terminator)

💎 A minimal yet powerful package to give you opportunity to refactor your controllers.

-

---

### Laravel Widgetize

[](#laravel-widgetize)

💎 A minimal yet powerful package to give a better structure and caching opportunity for your laravel apps.

-

---

### Laravel Master Pass

[](#laravel-master-pass)

💎 A simple package that lets you easily impersonate your users.

-

---

### Laravel HeyMan

[](#laravel-heyman)

💎 It allows to write exressive and defensive code whcih is decoupled from the rest of your app.

-

---

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance43

Moderate activity, may be stable

Popularity44

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 83.5% 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 ~247 days

Recently: every ~371 days

Total

11

Last Release

449d ago

PHP version history (3 changes)v1.0.0PHP &gt;=5.6.0

v1.0.7PHP ^7.1.3|7.2.\*|7.3.\*|7.4.\*

v1.0.8PHP ^7.1.3|7.2.\*|7.3.\*|7.4.\*|8.\*

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6961695?v=4)[Iman](/maintainers/imanghafoori1)[@imanghafoori1](https://github.com/imanghafoori1)

---

Top Contributors

[![imanghafoori1](https://avatars.githubusercontent.com/u/6961695?v=4)](https://github.com/imanghafoori1 "imanghafoori1 (76 commits)")[![reziamini](https://avatars.githubusercontent.com/u/29504334?v=4)](https://github.com/reziamini "reziamini (6 commits)")[![rahi69](https://avatars.githubusercontent.com/u/35202922?v=4)](https://github.com/rahi69 "rahi69 (2 commits)")[![SjorsO](https://avatars.githubusercontent.com/u/7202674?v=4)](https://github.com/SjorsO "SjorsO (2 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![muhammadmp97](https://avatars.githubusercontent.com/u/17279395?v=4)](https://github.com/muhammadmp97 "muhammadmp97 (1 commits)")[![cyberhicham](https://avatars.githubusercontent.com/u/10002527?v=4)](https://github.com/cyberhicham "cyberhicham (1 commits)")[![amirsadeghi1](https://avatars.githubusercontent.com/u/26359326?v=4)](https://github.com/amirsadeghi1 "amirsadeghi1 (1 commits)")

---

Tags

laravellaravel-authenticationlaravel-utilityphplaravellaravel5laravel-utilitylaravel5-package

### Embed Badge

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

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

###  Alternatives

[imanghafoori/laravel-terminator

A minimal yet powerful package to give you opportunity to refactor your controllers.

25353.0k](/packages/imanghafoori-laravel-terminator)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[imanghafoori/laravel-heyman

A package to help you write expressive defensive code in a functional manner

92537.1k5](/packages/imanghafoori-laravel-heyman)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)[salmanzafar/laravel-geocode

A Laravel Library to find Lat and Long of a given Specific Address

153.9k](/packages/salmanzafar-laravel-geocode)

PHPackages © 2026

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