- What Laravel versions does rap2hpoutre/create-user-command support?
- The last release was published in December 2016, which places it in the Laravel 5.3/5.4 era. Its composer constraints and hardcoded assumptions about the user model and field names will not resolve or run unmodified on Laravel 9, 10, 11 or 12. On Laravel 5.x through 8.x it may still install and work with minor adjustment. For anything newer, plan to copy the command into your application instead of requiring the package.
- How do I install create-user-command in a Laravel app?
- Installation is a normal Composer require plus service provider registration, with zero configuration beyond that. Once installed, the Artisan command becomes available and prompts you for name, email and password interactively. Because of its age, expect Composer dependency resolution to fail on modern Laravel versions. If that happens, treat the source as a starting point rather than a dependency.
- Does this package work with Laravel 11 or Laravel 12?
- Not as a Composer dependency. The package targets the 2016-era Laravel releases, and its constraints, default App\User model reference and field assumptions will break on Laravel 9 and above. The practical path is to publish or copy the roughly 100 lines of command code into app/Console/Commands and modernize the namespace, model reference and validation rules. That reframes the decision as adopting a code sample rather than a maintained package.
- How do I customize the fields or user model used by the command?
- The command is explicitly designed to be published and overridden into your own application namespace. You change the signature, the prompt questions and the model class it writes through so it matches your users table and schema. Since you will be owning the file, you can also add role assignment, team or tenant IDs, or extra profile columns. This in-repo copy is what should go through code review and CI.
- Are passwords stored securely by this command?
- Yes, it uses Laravel's Hash facade, so the password is hashed with your configured hasher rather than stored in plain text. You should still confirm the hashing driver matches your production configuration, especially if you have changed the default bcrypt setup. Also note that any value passed as a CLI argument can land in shell history and process listings, so prefer the interactive prompt for sensitive input.
- Can I run this command non-interactively in CI or a seeder?
- Not reliably. The command is built around interactive prompts, and there is no documented non-interactive or signature-flag mode for scripted provisioning. For CI pipelines, seeders or automated deployments you should use a dedicated seeder, a queued job or your own command with explicit options. If you fork it, adding --name, --email and --password flags is a small change worth making.
- What happens if the email address already exists?
- The package detects the duplicate and skips creation rather than throwing a hard failure. That is a check-then-act pattern with no transactional guarantee, so correctness ultimately depends on a unique index on the email column in your database. Make sure that index exists, and add a feature test asserting a duplicate email does not produce a second row.
- Does creating a user this way trigger model events or verification emails?
- The command simply persists a row through Eloquent, so it does not explicitly issue email verification tokens or invitation flows. Whether Creating, Created and Registered listeners fire depends on how the command calls the model, and email verification is likely bypassed entirely. If your user model implements MustVerifyEmail, test that a user created by the command can actually authenticate and complete verification.
- Is create-user-command safe to use in production?
- Treat it as abandoned: there is no maintainer, no security response process and no compatibility work since 2016. That makes the dominant risk abandonment rather than a specific defect. For local setup, demos and admin bootstrapping it is low risk, but for regulated environments needing audit trails or business-critical provisioning you should own and extend the code yourself.
- What are the alternatives to using this package?
- You can use a database seeder, a tinker session, Laravel's own make:user style command, or a small custom Artisan command tailored to your schema. A seeder or queued job is better for repeatable and scripted provisioning, while an admin surface is better when user creation is a business workflow rather than an operator convenience. Consider the package mainly as a compact reference implementation of an interactive create-user command.