PHPackages                             ryanhellyer/login-package-demo - 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. ryanhellyer/login-package-demo

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

ryanhellyer/login-package-demo
==============================

A demo package for Laravel authentication controllers.

08PHP

Since Dec 25Pushed 4mo agoCompare

[ Source](https://github.com/ryanhellyer/login_package_demo)[ Packagist](https://packagist.org/packages/ryanhellyer/login-package-demo)[ RSS](/packages/ryanhellyer-login-package-demo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Login Package Demo
==========================

[](#laravel-login-package-demo)

This is a demo package that extracts the authentication controllers from a Laravel application.

**Note:** This code heavily borrows from [Laravel Breeze](https://github.com/laravel/breeze), a Laravel starter kit for authentication scaffolding.

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

[](#installation)

1. Add the package to your `composer.json` file:

    ```
    "require": {
        "ryanhellyer/login-package-demo": "@dev"
    },
    "repositories": [
        {
            "type": "path",
            "url": "../login_package_demo"
        }
    ]
    ```
2. Run `composer update`.
3. Add the service provider to your `config/app.php` file:

    ```
    'providers' => [
        // ...
        RyanHellyer\LoginPackageDemo\LoginPackageDemoServiceProvider::class,
    ],
    ```
4. Run the interactive setup command (recommended):

    ```
    php artisan login-package-demo:install
    ```

    This will:

    - Prompt you for your User model class
    - Optionally customize route paths
    - Automatically add `.env` variables
    - Publish and configure the config file

    **Or manually configure:**

    ```
    php artisan vendor:publish --provider="RyanHellyer\LoginPackageDemo\LoginPackageDemoServiceProvider"
    ```

    Then update your `config/login-package-demo-auth.php` file and `.env` file manually.

Usage
-----

[](#usage)

This package provides the following routes:

- `login`
- `logout`
- `register`
- `forgot-password`
- `reset-password`
- `verify-email`
- `confirm-password`
- `password`

### Using Built-in Views

[](#using-built-in-views)

You can include the package's built-in form views anywhere in your application:

```
{{-- Include login form --}}
@include('login-package-demo::auth.login')

{{-- Include registration form --}}
@include('login-package-demo::auth.register')

{{-- Include forgot password form --}}
@include('login-package-demo::auth.forgot-password')

{{-- Include confirm password form --}}
@include('login-package-demo::auth.confirm-password')
```

The GET routes redirect to `/` by default, so users should embed forms using the `@include()` directive rather than visiting dedicated pages.

Customizing Routes
------------------

[](#customizing-routes)

All route paths can be customized to match your application's URL structure. You can override routes in two ways:

### Method 1: Environment Variables

[](#method-1-environment-variables)

Add the following to your `.env` file:

```
LOGIN_PACKAGE_LOGIN_PATH=sign-in
LOGIN_PACKAGE_REGISTER_PATH=sign-up
LOGIN_PACKAGE_LOGOUT_PATH=sign-out
LOGIN_PACKAGE_FORGOT_PASSWORD_PATH=forgot-password
LOGIN_PACKAGE_RESET_PASSWORD_PATH=reset-password
LOGIN_PACKAGE_VERIFY_EMAIL_PATH=verify-email
LOGIN_PACKAGE_CONFIRM_PASSWORD_PATH=confirm-password
LOGIN_PACKAGE_PASSWORD_PATH=password
```

### Method 2: Config File

[](#method-2-config-file)

After publishing the config file, edit `config/login-package-demo-auth.php`:

```
'routes' => [
    'login' => 'sign-in',
    'register' => 'sign-up',
    'logout' => 'sign-out',
    // ... etc
],
```

### Important Notes

[](#important-notes)

- Route names remain consistent regardless of path customization. For example, `route('login')` will always work, even if you change the path to `sign-in`.
- If you customize `reset-password` or `verify-email` paths, the route parameters (`{token}`, `{id}/{hash}`) will be automatically appended to your custom path.
- Default paths are used if no customization is provided, so the package works out of the box.

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2024 Ryan Hellyer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance54

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

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/344653ee76e4fc90cb406062cd8a6fc04977571f5eb09af7ae58736249d65f98?d=identicon)[ryanhellyer](/maintainers/ryanhellyer)

---

Top Contributors

[![ryanhellyer](https://avatars.githubusercontent.com/u/430544?v=4)](https://github.com/ryanhellyer "ryanhellyer (13 commits)")

### Embed Badge

![Health badge](/badges/ryanhellyer-login-package-demo/health.svg)

```
[![Health](https://phpackages.com/badges/ryanhellyer-login-package-demo/health.svg)](https://phpackages.com/packages/ryanhellyer-login-package-demo)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M100](/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.2M117](/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)
