Download the PHP package webmonks/laravel-api-modules without Composer
On this page you can find all versions of the php package webmonks/laravel-api-modules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-api-modules
Laravel RESTful API Module Wise
SOLID-principle Laravel modular code generator for API-first projects.
Features
-
π Generate Modular API Code:
php artisan make:module {Name} [--resource]
creates Controllers, Models, Services, Repositories, Interfaces, Requests, Migrations, and Tests (API only) β all SOLID and modular. -
π Automatic Repository Binding:
Auto-binds{Module}RepositoryInterface
to{Module}Repository
for all modules. No manual registration needed. -
π§© BaseModel & BaseService:
Optionally generate and extend your ownBaseModel
andBaseService
for DRY, testable, and reusable code. -
π·οΈ Traits & Helpers:
Automatically publishes a suite of useful traits and a flexible helper autoloader, with zero manual setup. -
π Customizable Stubs:
Publish and edit all stub templates to fit your teamβs conventions. -
βοΈ Powerful Config:
Everything is tweakable inconfig/laravel-api-modules.php
. -
π Auto Route Registration:
All generated modules auto-register their routes. - π‘οΈ Modern Laravel Support:
Compatible with Laravel 8β12, PHP 7.2β8.3.
Installation
Usage
Generate a complete module:
Directory Structure
After generating a module, your app will typically look like:
See docs/STRUCTURE.md for a full breakdown.
Repository Binding
- The package auto-generates
app/Core/Providers/RepositoryServiceProvider.php
to bind each{Module}RepositoryInterface
to its{Module}Repository
. - No manual registration needed: This provider is automatically registered by the package if present. You don't need to edit
config/app.php
.
Helper Autoloading
- All PHP files in
app/Helpers/AutoloadFiles/
are auto-loaded at runtime. - Provided via a package
HelperServiceProvider
(auto-discovered, zero setup). - See docs/HELPERS.md for advanced usage and extending helpers.
Traits
- Required traits:
ApiResponser
,SoftDeletes
- Optional traits:
ActivityLogHelper
,PdfGeneratorTrait
,SmsSender
,UserUpdater
- All traits are published to
app/Core/Traits/
on first use if not already present. - See docs/TRAITS.md for details and customization.
Configuration
- Configure everything in
config/laravel-api-modules.php
. - Enable/disable traits, base service/model, customize namespaces, stub replacements, and more.
- See docs/CONFIGURATION.md for a full option reference.
Customization
- Edit stub files in
stubs/laravel-api-modules/
after publishing to match your teamβs conventions. - Adjust config in
config/laravel-api-modules.php
. - Add your own traits and helpers; they'll be published automatically.
Advanced Topics
- Directory Structure Deep Dive
- Helpers System
- Traits & Extending Models
- Full Configuration Reference
- Upgrade Guide
- Changelog
Contributing
See CONTRIBUTING.md for guidelines and how to get involved.
License
MIT
All versions of laravel-api-modules with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
barryvdh/laravel-dompdf Version ^2.0 || ^3.0
twilio/sdk Version *