You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Out of the box, Laravel makes it really simple to scaffold out with its [authentication quickstart](https://laravel.com/docs/5.4/authentication#authentication-quickstart). Whilst this makes it really easy to register and authenticate users, for many of the applications I find myself building, we usually remove the ability for visitors to register themselves.
14
+
Out of the box, Laravel makes it really simple to scaffold out with its [authentication quickstart](https://laravel.com/docs/5.7/authentication#authentication-quickstart). Whilst this makes it really easy to register and authenticate users, for many of the applications I find myself building, we usually remove the ability for visitors to register themselves.
15
15
16
16
I still need a way to get users into those applications, however, and whilst they're in early development this usually involves firing up Laravel Tinker. This can be a tedious process, and one that I repeat many times over.
17
17
@@ -24,45 +24,26 @@ Laravel | Package
24
24
5.4.* | 1.0.*
25
25
5.5.* | 2.0.*
26
26
5.6.* | 3.0.*
27
+
5.7.* | 4.0.*
27
28
28
29
## Code Samples
29
30
30
31
This package exposes a `make:user` command, which is accessed via the Artisan command line utility. The package will use the model defined in your `auth.providers.users.model` configuration value.
If the password is not specified, the `--send-reset` option is implicit, sending the default password reset notification to the user. This package does not currently provide support to customise the content or notification sent as my general practice is to create a user account, then have the user manually perform a password reset. The implied `--send-reset` saves a manual step in this process.
37
-
38
-
This package runs on the assumption that you are using Laravel's default `users` table structure. If you have additional columns in your database, they can be specified using the `--fields` option, separating each key/value pair with a comma:
This will create a new user with the email address `[email protected]`, a randomly generated password, send the password reset email to `[email protected]`, and set the `admin` field to `true`. Should you need to circumvent your user model's guarded fields, you can pass the `--force` option, and the user model will be created using the `forceCreate` method.
37
+
This package runs on the assumption that you are using Laravel's default `users` table structure. You can specify additional fields when prompted.
45
38
46
39
## Installation
47
40
48
41
This package is installed via [Composer](https://getcomposer.org/). To install, run the following command.
49
42
50
43
```bash
51
-
composer require "dyrynda/laravel-make-user:~3.0"
44
+
composer require "dyrynda/laravel-make-user:~4.0"
52
45
```
53
46
54
-
Then add the service provider to your `config/app.php` file:
55
-
56
-
```php
57
-
'providers' => [
58
-
// ...
59
-
Dyrynda\Artisan\MakeUserServiceProvider::class,
60
-
// ...
61
-
]
62
-
```
63
-
64
-
Note, this package has support for Laravel's auto package discovery, which will be available from version 5.5 onwards.
65
-
66
47
## Support
67
48
68
49
If you are having general issues with this package, feel free to contact me on [Twitter](https://twitter.com/michaeldyrynda).
0 commit comments