diff --git a/src/Commands/CreateUser.php b/src/Commands/CreateUser.php index c4bd4f3..6e8fb4f 100644 --- a/src/Commands/CreateUser.php +++ b/src/Commands/CreateUser.php @@ -33,7 +33,7 @@ public function handle() $model = config('createuser.model'); - $user = new $model; + $user = new $model(); $model::fill([ 'name' => $name, diff --git a/src/Config/createuser.php b/src/Config/createuser.php index 983a602..d8c8d8b 100644 --- a/src/Config/createuser.php +++ b/src/Config/createuser.php @@ -1,4 +1,5 @@ 'App\User' -]; \ No newline at end of file + 'model' => 'App\User', +]; diff --git a/src/CreateUserServiceProvider.php b/src/CreateUserServiceProvider.php index 19473f3..2b727bb 100644 --- a/src/CreateUserServiceProvider.php +++ b/src/CreateUserServiceProvider.php @@ -28,4 +28,4 @@ public function register() Commands\CreateUser::class, ]); } -} \ No newline at end of file +}