PHP code example of sergeybruhin / laravel-user-commands

1. Go to this page and download the library: Download sergeybruhin/laravel-user-commands library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sergeybruhin / laravel-user-commands example snippets


// config/laravel-user-commands.php
return [
    'user_model'          => \App\Models\User::class,
    'min_password_length' => 6,
];
bash
php artisan vendor:publish --provider="SergeyBruhin\LaravelUserCommands\Providers\LaravelUserCommandsServiceProvider" --tag="config"
bash
# Interactive
php artisan users:create

# Non-interactive
php artisan users:create --name="John Doe" --email="[email protected]" --password="secret123"
bash
# Interactive
php artisan users:change-password

# Non-interactive
php artisan users:change-password --email="[email protected]" --password="newpassword"
bash
# Interactive (with confirmation prompt)
php artisan users:delete

# Target a specific user
php artisan users:delete --email="[email protected]"

# Skip confirmation
php artisan users:delete --email="[email protected]" --force