Download the PHP package l0n3ly/laravel-repository-with-service without Composer
On this page you can find all versions of the php package l0n3ly/laravel-repository-with-service. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download l0n3ly/laravel-repository-with-service
More information about l0n3ly/laravel-repository-with-service
Files in l0n3ly/laravel-repository-with-service
Package laravel-repository-with-service
Short Description Repository and service pattern package for Laravel
License MIT
Homepage https://github.com/l0n3ly/laravel-repository-with-service.git
Informations about the package laravel-repository-with-service
Laravel Repository With Service
A Laravel package that scaffolds the repository and service pattern โ generates repository and service classes with interfaces, and automatically binds them to their implementations via the container.
โจ Features
- ๐๏ธ Artisan Scaffolding - Generate repositories and services with
make:repositoryandmake:service - ๐ Auto Binding - Automatically binds interfaces to implementations via the service container
- ๐ Subdirectory Support - Organize classes in nested directories (e.g.,
Admin/UserRepository) - ๐ Paired Generation - Generate a repository and service together with a single command
- ๐ Interface-First - Always generates a contract interface alongside each implementation
- ๐จ Multiple Templates - Choose between API service template or blank template
- ๐ค Boost Compatible - Full support for Laravel Boost AI-powered workflows and Copilot skills
๐ Requirements
- PHP ^8.2
- Laravel 11, 12, or 13
๐ฆ Installation
Install the latest 1.x release:
Publish the config file:
Quick Start
Fastest Start: Generate Everything at Once
Scaffold a complete feature with one command:
This creates everything โ model, migration, factory, seeder, controller, repository, and service.
Generate a Repository
Generate a Service
Generate from a Model
Use in Your Code
Services and repositories are automatically bound to the container:
๐ Documentation
Comprehensive documentation is available:
| Document | Purpose |
|---|---|
| Full Guide | Installation, quick start, and all commands |
| API Reference | Core interfaces and configuration |
| Troubleshooting | Common issues and solutions |
| Examples | Real-world usage examples |
| Contributing | Contribution guidelines |
| Laravel Boost Integration | Using with AI-powered Boost workflows |
๐ค Laravel Boost Support
This package is fully integrated with Laravel Boost and provides three AI skills to enhance your development workflow:
Three Essential Skills
- Repository Generator - Generate repositories with best practices
- Service Generator - Generate services with business logic
- Service Binding - Understand dependency injection and binding patterns
These skills are located in resources/boost/skills/ and are discovered by running:
Select the desired skills during installation, and they'll be available to your AI agent.
AI-Powered Workflows
Get intelligent suggestions for:
- Generating complete feature modules
- Creating repository hierarchies
- Setting up service structures
- Testing patterns and mocking
Example Boost Usage
Getting Started with Boost
- Install Laravel Boost in your Laravel project
- Run
php artisan boost:install --discover - Select this package's skills when prompted
- Ask your AI agent to generate repositories, services, or help with architecture
See BOOST.md for detailed integration guide.
๐ฏ Common Patterns
Blog Application
E-Commerce
SaaS with Multi-Tenancy
See EXAMPLES.md for complete real-world examples.
๐ง Configuration
Edit config/service-repository.php to customize:
Override Binding Example
Decorate or replace a bound implementation in your service provider:
Service API Template
The --api flag generates services with response helpers:
๐ Performance Tips
- Use Caching - Wrap repositories with caching decorators
- Eager Loading - Use Eloquent's
with()in repositories - Singleton Services - For stateless services, bind as singleton
- Optimize Queries - Focus repository methods on specific queries
๐งช Testing
Mock repositories in tests:
๐ Real-World Examples
Check EXAMPLES.md for complete implementations:
- Blog with posts, comments, and categories
- E-commerce checkout process
- Multi-tenant SaaS structure
- Admin dashboards
- Testing patterns
๐ค Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
๐ License
The MIT License (MIT). Please see LICENSE.md for more information.
Support
- ๐ Documentation: See
docs/directory - ๐ Issues: Report on GitHub
- ๐ฌ Discussions: Ask questions on GitHub Discussions
- ๐ง Help: Check Troubleshooting Guide
Project guide:
Changelog
See CHANGELOG for release notes.
License
MIT. See LICENSE.md.
All versions of laravel-repository-with-service with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0||^13.0