make:controller
Creates a new controller class in theapp/controllers/ directory.
name(required) - The controller name (“Controller” suffix is optional)
The command automatically adds the “Controller” suffix if not provided, so
User and UserController produce the same result.make:model
Creates one or more model classes in theapp/Models/ directory.
name(required, array) - One or more model names
make:migration
Creates a new database migration file using Phinx.migration(required, array) - One or more migration names
--seeder=<name>- Also create a seeder file (can be used multiple times)
make:seed
Creates a new database seeder class using Phinx.seeder(required, array) - One or more seeder names
make:middleware
Creates a new middleware class in theapp/middlewares/ directory.
name(required) - The middleware name
The “Middleware” suffix is automatically added if not provided.
make:job
Creates a new queue job class in theapp/queues/jobs/ directory.
name(required) - The job name
make:event
Creates a new event class in theapp/events/ directory.
name(required) - The event name
make:cron
Creates a new cron job class in theapp/queues/crons/ directory.
name(required) - The cron job name
Cron jobs created with this command need to be scheduled. They run when the
scheduler command is executed.make:provider
Creates a new service provider in theapp/providers/ directory.
name(required) - The provider name
Service providers are used to bootstrap services and configure the application container.
make:worker
Creates a new worker class with optional supporting files (script, config, and log files).name(required) - The worker name
-p, --processes=<num>- Number of processes (default: 3)-l, --log- Create a log file for the worker-c, --config- Create a supervisor config file-s, --script- Create a worker script file-a, --all- Create all supporting files (script, config, and log)
make:command
Creates a new custom CLI command in theapp/commands/ directory.
name(required) - The command name
The command name is automatically converted from PascalCase to colon-separated format. For example,
SendEmails becomes send:emails.Naming Conventions
All make commands follow these conventions:Automatic Suffixes
Automatic Suffixes
Many commands automatically append appropriate suffixes:
- Controllers:
Controller - Middleware:
Middleware - Jobs:
Job - Events:
Event - Crons:
Cron - Workers:
Worker - Providers:
ServiceProvider
Case Formatting
Case Formatting
- Class names are converted to PascalCase
- Existing suffixes are removed before appending the correct one
- Worker script and config files use kebab-case
Directory Structure
Directory Structure
Generated files are placed in conventional directories:
- Controllers →
app/controllers/ - Models →
app/Models/ - Middleware →
app/middlewares/ - Events →
app/events/ - Jobs →
app/queues/jobs/ - Crons →
app/queues/crons/ - Workers → Environment variable
WORKERS_DIR - Commands →
app/commands/ - Providers →
app/providers/
Next Steps
Database Commands
Run migrations and seed your database
Cache Commands
Manage application cache