Download the PHP package myohanhtet/service-layer without Composer
On this page you can find all versions of the php package myohanhtet/service-layer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download myohanhtet/service-layer
More information about myohanhtet/service-layer
Files in myohanhtet/service-layer
Package service-layer
Short Description A Laravel package to generate service layer files
License MIT
Informations about the package service-layer
Laravel Service Layer Generator
A SOLID-compliant service layer generator for Laravel applications that enforces best practices through interface-implementation separation.
✨ Features
- Automatic interface and implementation generation
- Auto-binding in Service Provider
- Proper namespace organization (
ServicesandServices/Impl) - Stub customization support
- SOLID architecture enforcement
- Laravel container integration
📦 Installation
Install via Composer:
🚀 Usage
Basic Service Generation
This creates:
🏗️ Generated Files
-
Interface:
app/Services/UserService.php -
Implementation:
app/Services/Impl/UserServiceImpl.php - Auto-generated Binding in:
AppServiceProvider:
🔧 Advanced Usage
Customizing Stubs
Publish the stubs to customize:
Then modify:
stubs/service.stubstubs/service-impl.stub
Manual Binding:
if auto-binding fails, you can manually bind the service in your AppServiceProvider:
🛠️ Requirements
- PHP 8.0 or higher
- Laravel 11 or higher
🤝 Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss.
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/YourFeature) - Open a pull request
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
Made with ❤️ by Myo Han Htet