Download the PHP package jponchiroli/laravel-base without Composer
On this page you can find all versions of the php package jponchiroli/laravel-base. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jponchiroli/laravel-base
More information about jponchiroli/laravel-base
Files in jponchiroli/laravel-base
Package laravel-base
Short Description Base classes, standardized JSON responses with i18n messages (en, pt_BR) and a make:domain generator for Laravel API domains.
License MIT
Homepage https://github.com/JPonchiroli/laravel-base
Informations about the package laravel-base
jponchiroli/laravel-base
🇧🇷 Portuguese version
What it is
A foundation for Laravel 13 APIs. It ships layered base classes (service, repository, DTOs, requests, resources), standardized JSON responses and errors with translated messages (en, pt_BR), and a make:domain command that generates the whole API layer of an entity.
How it works
- You install the package and run one setup command.
php artisan make:domain Productgenerates the controller, service, repository, DTOs, requests and routes of the entity. Each generated class is an empty subclass of a base class that lives in the package.- You only add the migration, the model's
$fillableand the validation rules of the Requests. - The endpoints answer with a fixed envelope (
{ "message": "...", "data": ... }), errors follow one format, and validation messages are derived from the rules and translated.
Generated code belongs to your project, so you can override any behaviour in the entity's own classes.
Installation
Requires PHP 8.3+ and Laravel 13.
The service provider is discovered automatically. Composer does not run Artisan commands for dependencies, so laravel-base:install is a manual step; it is safe to run more than once. Options, configuration keys and publish tags are in docs/install-and-configuration.md.
Documentation
Technical documentation lives in docs/:
| Topic | |
|---|---|
| Getting started | From install to a working CRUD |
| Architecture | How the package is organized |
| Request lifecycle | What happens to one request |
| Layers | Responsibility of each layer and base class |
| DTOs | How validated data travels |
| Responses and errors | Payload shapes and the error handler |
| Validation and translations | Derived messages and languages |
make:domain |
The generator, stubs and routes |
| Testing | How the package is tested |
Using with AI agents
The package ships a guide for AI coding agents. It tells the agent to run make:domain instead of writing each file by hand, which saves tokens and keeps the code consistent. Publish it into your project as AGENTS.md:
Details in docs/ai-agent-guide.md.
Releasing
make:domain also generates Swagger/OpenAPI documentation per domain (app/Docs/, swagger-php attributes), built from the Request rules and table columns, and served at /docs. Refresh it with php artisan domain:docs.
License
MIT. See LICENSE.