定制 lornequinn/auth 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lornequinn/auth

最新稳定版本:v2.0.1

Composer 安装命令:

composer require lornequinn/auth

包简介

Fortify-based authentication with Livewire views for Laravel

README 文档

README

Fortify-based authentication with Livewire views for Laravel. Drop-in auth scaffold with login, registration, password reset, email verification, two-factor authentication, and a profile page.

Requirements

  • PHP 8.3+
  • Laravel 13
  • Livewire 4

Installation

composer require lornequinn/auth

The package auto-discovers via Laravel's package discovery. No manual provider registration needed.

Publish the config:

php artisan vendor:publish --tag=lq-auth-config

Database

Run the Fortify migrations (if you haven't already):

php artisan migrate

Your User model must implement MustVerifyEmail if you want email verification:

use Illuminate\Contracts\Auth\MustVerifyEmail;

class User extends Authenticatable implements MustVerifyEmail
{
    // ...
}

For two-factor authentication, add the TwoFactorAuthenticatable trait:

use Laravel\Fortify\TwoFactorAuthenticatable;

class User extends Authenticatable implements MustVerifyEmail
{
    use TwoFactorAuthenticatable;
}

What You Get

Routes

Route Component Middleware
/login Login guest
/register Register guest
/forgot-password ForgotPassword guest
/reset-password/{token} ResetPassword guest
/two-factor-challenge TwoFactorChallenge guest
/email/verify VerifyEmail auth
/user/confirm-password ConfirmPassword auth
/dashboard Dashboard auth, verified
/profile ProfileShow auth, verified

Livewire Components

All components are registered under the lq-auth prefix:

  • lq-auth.login
  • lq-auth.register
  • lq-auth.forgot-password
  • lq-auth.reset-password
  • lq-auth.verify-email
  • lq-auth.confirm-password
  • lq-auth.two-factor-challenge
  • lq-auth.dashboard
  • lq-auth.profile.show
  • lq-auth.profile.update-profile-information
  • lq-auth.profile.update-password
  • lq-auth.profile.two-factor-authentication

Configuration

After publishing, edit config/lq-auth.php:

Layouts

'guest_layout' => 'lq-auth::layouts.guest',
'app_layout' => 'lq-auth::layouts.app',

Override these to use your own layouts. The package ships minimal layouts — point these at your app's layout views or a UI package.

Features

Toggle any Fortify feature:

'features' => [
    'registration' => true,
    'reset-passwords' => true,
    'email-verification' => true,
    'update-profile-information' => true,
    'update-passwords' => true,
    'two-factor-authentication' => true,
],

Post-Login Redirect

'home' => '/dashboard',

Middleware

Middleware for authenticated routes (dashboard, profile):

'middleware' => ['web', 'auth', 'verified'],

Custom Actions

Override Fortify action classes with your own:

'actions' => [
    'create_user' => App\Actions\CreateNewUser::class,
    'update_profile' => null, // null = use package default
    'update_password' => null,
    'reset_password' => null,
],

Customising Views

Publish the views:

php artisan vendor:publish --tag=lq-auth-views

Views are published to resources/views/vendor/lq-auth/. Edit them directly.

License

MIT

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固