定制 jacquestrdx123/vue-login-flow 二次开发

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

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

jacquestrdx123/vue-login-flow

Composer 安装命令:

composer require jacquestrdx123/vue-login-flow

包简介

A Laravel package to quickly set up custom guards with Inertia.js/Vue login pages

README 文档

README

A Laravel package that quickly sets up custom authentication guards with Inertia.js/Vue login pages.

Features

  • Automatically configures Laravel guards and providers
  • Generates Vue login components with Inertia.js
  • Creates login controllers with authentication logic
  • Optional HandleInertiaRequest middleware for guard-specific data sharing
  • Supports both session and Sanctum authentication

Installation

  1. Install the package via Composer:
composer require jacquestredoux/vue-login-flow
  1. During installation, you'll be prompted for:

    • Model name (e.g., User, Admin)
    • Guard name (e.g., admin, staff)
    • URL prefix (e.g., /admin, /staff)
    • Create login page? (yes/no)
    • Create HandleInertiaRequest middleware? (yes/no)
  2. Run the install command to copy files to your Laravel application:

php artisan vue-login-flow:install
  1. Compile your assets:
npm run dev

Usage

After installation, you can access the login page at the URL prefix you specified (e.g., /admin/login).

Authentication

The package creates a login controller that handles:

  • GET {url_prefix}/login - Show login form
  • POST {url_prefix}/login - Handle login
  • POST {url_prefix}/logout - Handle logout

Using the Guard

In your controllers, use the guard like this:

use Illuminate\Support\Facades\Auth;

// Get authenticated user
$user = Auth::guard('admin')->user();

// Check if authenticated
if (Auth::guard('admin')->check()) {
    // User is authenticated
}

// Require authentication in middleware
Route::middleware(['auth:admin'])->group(function () {
    // Protected routes
});

HandleInertiaRequest Middleware

If you enabled the HandleInertiaRequest middleware, it will share the authenticated user for your guard in Inertia responses:

<script setup>
// In your Vue components
const props = defineProps({
    auth: {
        admin: {
            user: {
                id: Number,
                name: String,
                email: String,
            }
        }
    }
})
</script>

You can apply this middleware to specific routes:

Route::prefix('admin')
    ->middleware(['auth:admin', 'admin.handle-inertia'])
    ->group(function () {
        // Your admin routes
    });

Configuration

The package creates a config/vue-login-flow.php file with your settings. You can modify it directly or use environment variables:

VUE_LOGIN_FLOW_MODEL=App\Models\Admin
VUE_LOGIN_FLOW_GUARD=admin
VUE_LOGIN_FLOW_URL_PREFIX=/admin
VUE_LOGIN_FLOW_CREATE_LOGIN_PAGE=true
VUE_LOGIN_FLOW_CREATE_MIDDLEWARE=false
VUE_LOGIN_FLOW_AUTH_TYPE=session

File Structure

After installation, the following files are created:

app/
├── Http/
│   ├── Controllers/
│   │   └── {GuardName}/
│   │       └── LoginController.php
│   └── Middleware/
│       └── {GuardName}HandleInertiaRequest.php (optional)

resources/
└── js/
    └── Pages/
        └── {GuardName}/
            └── Login.vue

routes/
└── web.php (routes added)

Requirements

  • PHP 8.1+
  • Laravel 10.0+ or 11.0+
  • Inertia.js Laravel adapter
  • Vue 3

License

MIT

Support

For issues and questions, please open an issue on GitHub.

vue-login-flow

jacquestrdx123/vue-login-flow 适用场景与选型建议

jacquestrdx123/vue-login-flow 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 jacquestrdx123/vue-login-flow 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jacquestrdx123/vue-login-flow 我们能提供哪些服务?
定制开发 / 二次开发

基于 jacquestrdx123/vue-login-flow 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-07