PHPackages                             masoud5070/vandarauthbasic - 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. masoud5070/vandarauthbasic

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

masoud5070/vandarauthbasic
==========================

implement auth basic for vandar services

150PHP

Since Dec 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Masoud5070/VandarAuthBasic)[ Packagist](https://packagist.org/packages/masoud5070/vandarauthbasic)[ RSS](/packages/masoud5070-vandarauthbasic/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

VandarAuthBasic
===============

[](#vandarauthbasic)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b516d8ccfed44bd91d2979f36b37398e97a103e8b54c56e33bb5a0ed0024ba7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61736f7564353037302f76616e6461726175746862617369632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masoud5070/vandarauthbasic)[![Total Downloads](https://camo.githubusercontent.com/551b567d2bd1d48d3f8035514f76f7eb7511051ba3cc48e2a6a06d4e2d3b8a3e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61736f7564353037302f76616e6461726175746862617369632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masoud5070/vandarauthbasic)[![Build Status](https://camo.githubusercontent.com/a332bf6698400b4884e30588f87df549dfd2291f732d61da84a4130f6feb1199/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d61736f7564353037302f76616e6461726175746862617369632f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/masoud5070/vandarauthbasic)[![StyleCI](https://camo.githubusercontent.com/cb13a877afd1dbe223c631789c3f922d3ace958fdb334a9cce9b26afefbc2ebd/68747470733a2f2f7374796c6563692e696f2f7265706f732f31323334353637382f736869656c64)](https://styleci.io/repos/12345678)

This package implements the laravel's default `auth.basic` middleware for vandar services:

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

[](#installation)

Via Composer

```
$ composer require masoud5070/vandarauthbasic
```

If you do not run Laravel 5.5 (or higher), then add the service provider and alias in `config/app.php`:

On the `config\app.php` add this to the `providers` array value:

```
"Masoud5070\VandarAuthBasic\VandarAuthBasicServiceProvider"
```

and this one on the `alias` array value:

```
"VandarAuthBasic" => "Masoud5070\VandarAuthBasic\Facades\VandarAuthBasic"
```

Usage
-----

[](#usage)

First publish config file and select `vandarauthbasic.config` tag with the command below:

```
$ php artisan vendor:publish
```

After config file was published you can change `model_name` with your model and set your data that create into database with `database_records`.

**NOTE:** When change `model_name` with your model class, table name will automatically change with `$table` of model.

**NOTE:** You should set `ADMINS_TABLE_EMAIL` and `ADMINS_TABLE_PASSWORD` on the `.env` file, then run the migration for creating the table:

```
$ php artisan migrate
```

To generate the admin user into the `admins` table run the command below:

```
$ php artisan vandar:admins-consideration
```

**NOTE:** This package uses `Admin` model and `admins` table by default.

Then add guard and provider to 'auth.php' config file:

```
'guards' => [
         'admin' => [
             'driver' => 'session',
             'provider' => 'admins',
         ],

         ...
    ],

'providers' => [
         'admins' => [
             'driver' => 'eloquent',
             'model' => \Masoud5070\VandarAuthBasic\Models\Admin::class,
         ],
    ],
```

After running this command and setting the provider, you can set the `auth.basic:web` middleware on the routes you want:

```
$ Route::get('your-uri', 'YourController@method')->middleware('auth.basic:web');
```

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

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Masoud Haji Ali Tajer](https://github.com/masoud5070)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/877759d2d33932b98e47f3d76381aacf4feec3856b57ce34b6a3aa15e6530d08?d=identicon)[masoudtajer](/maintainers/masoudtajer)

---

Top Contributors

[![masoudtajer](https://avatars.githubusercontent.com/u/49834756?v=4)](https://github.com/masoudtajer "masoudtajer (2 commits)")

### Embed Badge

![Health badge](/badges/masoud5070-vandarauthbasic/health.svg)

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

###  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)
