laravel-architecture
Generates a Laravel architecture based on best practices for modern Laravel applications.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Laravel Architecture
Instructions
Architecture Patterns
-
Laravel Actions: Business logic organized in Action classes
(
lorisleiva/laravel-actions) - Inertia.js: Frontend built with Vue.js via Inertia.js
- Domain Organization: Features organized by domain (Auth, MentorPrograms, etc.)
- Repository Pattern: Not explicitly used, relies on Eloquent models
- Service Layer: Implemented via Action classes
- Database Migrations: Every change in the DB structure should be reflected in a new migration
- Database Seeders: Every change in DB data should be reflected in a seeder
- Database Factories: Every change in DB data should be reflected in a factory
- Database Queries: Prefer Eloquent models over raw queries
- Database Relationships: Prefer Eloquent relationships to raw queries
- Database Eager Loading: Prefer Eloquent eager loading over raw queries
- Database Pagination: Prefer Eloquent pagination over raw queries
- Database Scopes: Prefer Eloquent scopes over raw queries
- Database Soft Deletes: Prefer Eloquent soft deletes over raw queries
Performance Considerations
- Laravel Octane: Uses FrankenPHP for high-performance application server
- Redis: Used for caching, sessions, and queue management
- Database: PostgreSQL with proper indexing
- Asset Optimization: Image optimization tools included in Docker setup
Laravel 12 Structure
- No middleware files in
app/Http/Middleware/. -
bootstrap/app.phpis the file to register middleware, exceptions, and routing files. -
bootstrap/providers.phpcontains application specific service providers. -
No app\Console\Kernel.php - use
bootstrap/app.phporroutes/console.phpfor console configuration. -
Commands auto-register - files in
app/Console/Commands/are automatically available and do not require manual registration.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!