Download the PHP package newtovaux/laravel-console-user-tools without Composer
On this page you can find all versions of the php package newtovaux/laravel-console-user-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download newtovaux/laravel-console-user-tools
More information about newtovaux/laravel-console-user-tools
Files in newtovaux/laravel-console-user-tools
Package laravel-console-user-tools
Short Description Artisan commands for generating passwords, changing user passwords, listing users, and amending user email addresses in Laravel applications.
License MIT
Homepage https://github.com/newtovaux/laravel-console-user-tools
Informations about the package laravel-console-user-tools
Laravel Console User Tools
Artisan commands for generating passwords, changing user passwords, listing users, and amending user email addresses in Laravel 12 and 13 applications.
Why?
If you've ever had to jump onto a host, or into a container, because you don't have UI access (or if there's an issue) and you just need to quickly reset a password or alter a user somehow. If you don't want to memorise a bunch of SQL commands. If you just need to do user management quickly and easily.
... then perhaps this little package can help.
Installation
Available on Packagist: https://packagist.org/packages/newtovaux/laravel-console-user-tools
Source code: https://github.com/newtovaux/laravel-console-user-tools
This package supports Laravel 12 and 13 on PHP 8.3+.
Optional
Commands
Generate a password
Change a user's password
List all users
Change a user's email address
Configuration
If you want to override the defaults, publish the config file:
Available options:
These settings let you:
- use a custom Eloquent user model
- change the default lookup column from
emailto something else - set a default generated password length for
user-tools:create
Practical notes
First, this package assumes your user table has a password column and your configured user model is Eloquent-backed, which is the normal Laravel setup.
Second, the package uses the application's configured auth user model by default so it stays reusable across projects instead of hard-coding App\Models\User. That aligns well with Laravel's package and auth conventions.
Third, the write commands are intentionally interactive. user-tools:user-password and user-tools:user-amend-email both ask for confirmation before saving changes.
Fourth, user-tools:user-amend-email will try the configured lookup column first and then fall back to id lookup when appropriate.
Fifth, user-tools:list-users outputs id and email, ordered by id, and supports --limit for large tables.
Security notes
Passing secrets directly on the command line can leak them into shell history. On shared machines or production hosts, prompting for a password is usually safer than using --password='...'.
The --copy option on user-tools:create is currently a placeholder and does not copy to the clipboard yet.
Tests
Install development dependencies, then run the test suite with Composer:
The package tests run with PHPUnit 11 and Orchestra Testbench against an in-memory SQLite database, so no separate test database setup is required.
GitHub Actions runs the suite against a compatibility matrix covering Laravel 12 and 13 on PHP 8.3, 8.4, and 8.5.
License
This software is released under the MIT license.
All versions of laravel-console-user-tools with dependencies
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0