Download the PHP package mssalvo/banquet without Composer
On this page you can find all versions of the php package mssalvo/banquet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package banquet
Banquet
Banquet MVC Tool PHP + code generator. Da tabella DB a API funzionante in pochi secondi.
Accelera lo sviluppo generando automaticamente il layer applicativo (Entity, DAO, Model, Service, API e Route), lasciando al developer la libertà di costruire il resto come preferisce
MVC · DI Container · Routing · Generatore automatico · API REST
Installazione
Inizio rapido
| Hai già: | Metodo | Endpoint | Descrizione |
|---|---|---|---|
| GET | /corsi |
Lista HTML | |
| GET | /api/corsi |
Lista JSON | |
| GET | /api/corsi/{id} |
Singolo record | |
| POST | /api/corsi |
Inserimento | |
| PUT | /api/corsi |
Modifica | |
| DELETE | /api/corsi/{id} |
Eliminazione |
👉 Guida rapida 👉 Documentazione
API REST con JWT
Per API pubbliche, elimina $this->validateAuthToken(); dai metodi che vuoi rendere accessibili.
Comandi
| Comando | Cosa genera |
|---|---|
php banquet make:map all |
Entity, DAO, Model, Service per tutte le tabelle |
php banquet make:map corsi |
Idem per una tabella specifica |
php banquet make:map corsi full-action |
Come sopra + Action, View, Route, API REST |
php banquet make:action clienti |
Action + View + Route |
php banquet make:api corsi |
API REST + Route |
php banquet make:api corsi --with-swagger |
API REST + Route + OpenAPI |
php banquet make:action myaction --action-service=User |
Action con service diverso |
OpenAPI / Swagger
Genera annotation OpenAPI su Entity e classi REST, ed esporta il file openapi.yaml per visualizzare la documentazione con Swagger UI.
Il file OpenApiConfig.php (con le info globali: server, security, tag) viene creato automaticamente una sola volta nella directory app/src/Actions/Api/.
Routing
Le route vengono dichiarate tramite l'attributo #[Route] direttamente sui metodi delle Action classi:
Pattern supportati: {id}, {id:\d+}, {slug}-{id}.
I parametri si leggono con $this->route('id').
Niente più file web.php da gestire: lo scanner riflessivo trova automaticamente tutte le classi Action nella directory app/src/Actions/.
DI Container
Il container risolve le dipendenze automaticamente via Reflection:
Template Composite
Database supportati
| Driver | DB_DRIVER |
|---|---|
| MySQL | mysql |
| PostgreSQL | pgsql |
| SQLite | sqlite |
| SQL Server | sqlsrv |
Struttura
Requisiti
- PHP >= 8.0
- Composer
- PDO extension per il driver scelto
Built with PHP for simplicity and productivity.