jeishanul/laravel-repository-generator
Artisan generator for Laravel’s Repository pattern. Creates CRUD-ready interface and repository classes (supports nested namespaces), writes them to app/Interfaces and app/Repositories, and auto-binds them in AppServiceProvider. Laravel 10–12, --force overwrite.
Api/Admin/User), enabling modular architecture for large applications with distinct feature domains (e.g., admin panels, APIs).Adopt when:
Look elsewhere if:
spatie/laravel-repository or andersao/dingo-apigenerator."This package automates the creation of a Repository Pattern layer in Laravel, reducing developer time spent on boilerplate code by 30–50% for CRUD operations. By standardizing how data access is structured—with interfaces, concrete repositories, and auto-wired dependencies—we improve code maintainability, scalability, and team consistency. For example, a new feature requiring user management could be scaffolded in minutes instead of hours, accelerating development cycles. It’s a low-risk, high-reward tool that aligns with our long-term Laravel roadmap (compatible with v10–12) and supports modular architectures for future growth."
*"This Laravel Artisan command generates:
UserInterface) to define contracts for repositories.UserRepository) with CRUD methods.AppServiceProvider.php—no manual wiring needed.
It handles nested namespaces (e.g., Api/Admin/User) and includes a --force flag for overwrites. Why use it?create:repository commands or copy-pasting.*"Tired of writing the same repository boilerplate every time? This package auto-generates:
php artisan make:repository User --interface
→ Creates:
app/Interfaces/UserInterface.php (with find(), create(), etc.)app/Repositories/UserRepository.php (implements the interface)AppServiceProvider.
Pros:
✅ Handles nested paths (e.g., Api/Admin/User).
✅ --force flag for updates.
✅ Zero config—just install and run.
Cons:
⚠️ Basic CRUD only (no soft deletes, events, etc.).
⚠️ Laravel-only (not framework-agnostic).
Perfect for: New projects, team onboarding, or any time you need a quick, standardized repo layer."*How can I help you explore Laravel packages today?