Download the PHP package triquang/laravel-auth-scaffold without Composer
On this page you can find all versions of the php package triquang/laravel-auth-scaffold. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download triquang/laravel-auth-scaffold
More information about triquang/laravel-auth-scaffold
Files in triquang/laravel-auth-scaffold
Package laravel-auth-scaffold
Short Description Scaffold API & Web authentication for any Eloquent model with multi-auth support โ monolith or modular Laravel.
License MIT
Informations about the package laravel-auth-scaffold
Laravel Auth Scaffold
๐ Quickly scaffold full Laravel authentication for any Eloquent model, supporting multi-auth in both API and Web UI โ for monolith or modular apps.
This package accelerates authentication setup for custom models like Admin, Client, Vendor, etc., and works seamlessly with both standard Laravel and modular Laravel architectures (e.g., nwidart/laravel-modules).
โจ Features
- โ
Supports any Eloquent model (
User,Admin,Client, etc.) - โ Scaffold for both API routes/controllers/services and Web (views/forms)
- โ
Works with modules โ fully compatible with
nwidart/laravel-modules - โ Multi-auth ready โ configure multiple guards & providers automatically
- โ
Generates:
- Auth-ready Model (or updates existing one)
- Migrations (with OTP, password reset)
- Auth controllers (API + optional Web)
- Requests, Services, Routes, Views (if
--web) - Auth config updates (
guards,providers,passwords)
- โ One single command does it all
API functions
- Register
- Login
- Logout
- Forgot Password
- Reset Password
- Verify OTP
WEB functions
- Includes all API functions above, plus:
- Show register view
- Show login view
- Show Forgot Password view
- Show Reset Password view
- Show Verify OTP view
๐ฆ Installation
Optional: Publish Stubs
This will publish stubs to:
๐ Usage
Options
| Option | Description |
|---|---|
--model |
(Required) Name of the model to generate authentication for. Defaults to User. |
--module |
(Optional) Generate files inside Modules/{ModuleName}. |
--web |
(Optional) Include web views and web routes. |
Examples
1. Generate basic API auth for default User model
2. Generate API auth for Admin model
3. Generate full auth for Author model inside a module
4. Generate web+API auth for Client model
๐ File Structure Generated
Example with --model=Admin:
๐ก Authentication Compatibility Check
- The command will:
- Check if model extends
Illuminate\Foundation\Auth\User - Check if model has required traits like
HasApiTokens - Insert guidance comments if not
- Check if model extends
๐งฉ Customization
You can customize the stub files to suit your coding standards:
Edit stubs in:
๐งญ Auto-Generated Code Markers
This package adds clear flags in generated code to help developers easily find and review them.
Example
Available Markers
// AUTO-GEN-4-AUTH// AUTO-GEN: Placeholder// AUTH-SCAFFOLD-MISSING-COLUMNS
You can quickly search these markers (Ctrl/Cmd+Shift+F) to locate auto-generated code and remove them after review.
โ Why use this package?
Compared to Laravel Breeze, Jetstream or Fortify:
- โ
Supports any number of auth models (not just
User) - โ Works in both standard and modular architectures
- โ Auth flow is fully generated and flexible for customizing
- โ Designed for fast scaffolding with clean, extensible code
๐ก Example Use Cases
- Build multi separate auths for User, Admin, Vendor... in one app
- Use in modular apps like Modules/User, Modules/Admin
- Rapid implementing for auth APIs
- Auto-generate secure & clean Laravel auth structure
๐ซ Limitations
- Does not include frontend assets like Vue/React.
- For OTP/email verification, you need to configure mail/notification system.
โ Requirements
- PHP >= 8.0
- Laravel 11 / 12
- Composer
- Optional:
Laravel Sanctum - Optional:
nwidart/laravel-modules
๐ License
MIT ยฉ Nguyแป n Trรญ Quang
๐ Contributing
PRs are welcome! Feel free to improve functionality or report issues via GitHub Issues.
๐ฌ Contact
- GitHub: github.com/ntquangkk
- Email: [email protected]