make:controller
php mitosis make:controller UserController
Writes app/Controllers/UserController.php:
<?php
declare(strict_types=1);
namespace App\Controllers;
final class UserController
{
}
Real output:
✓ Created controller: /path/to/app/Controllers/UserController.php
Refuses to overwrite an existing file — running it again for the same name fails rather than silently discarding your edits:
✗ Controller already exists: /path/to/app/Controllers/UserController.php
Exit code 1 with no argument, or when the file already exists; 0 on success.
Next steps
- Console Kernel — how
mitosisdispatches to commands like this one. - make:model / make:service — the same generator pattern for models and services.