#}

Code Generation

Speed up development with GEMVC's powerful CLI code generators

Code Generation

Overview

GEMVC provides a comprehensive CLI tool for code generation, making it easy to create controllers, models, services, and database tables.

Controllers API endpoint handlers
Models Data structures
Services Business logic
Tables Database schema
info: The CLI tool follows GEMVC best practices and creates clean, well-structured code that integrates seamlessly with the framework.

CLI Commands

1

Create CRUD

Terminal
php vendor/bin/gemvc create:crud UserService
Tip: Creates service, controller, model, and table
2

Create Controller

Terminal
php vendor/bin/gemvc create:controller UserController
Tip: Creates a new API controller
3

Create Model

Terminal
php vendor/bin/gemvc create:model User
Tip: Creates a new data model
4

Create Table

Terminal
php vendor/bin/gemvc create:table users
Tip: Creates database table class
Tip: Use create:crud for the fastest way to build a complete API - it generates all required files in one command!

Next Steps