I'm trying to make a new custom entry in the /routes/console.php file so I can create a user from the cli.
I have a custom function that can create a user in \app\Http\Controllers\UserManagement
It's called createUser() and accepts 3 params ($user,$email,$password)
So far I have
Artisan::command('createuser {$user} {$email} {$password}', function ($user,$email,$password) { $this->createUser($user,$email,$password); })->describe('Create a user via the CLI');
Currently this errors with
Too few arguments to function Illuminate\Foundation\Console\ClosureCommand::__construct(), 1 passed in \vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php on line 208 and exactly 2 expected