55use Adldap \Models \User ;
66use Adldap \Laravel \Traits \ImportsUsers ;
77use Illuminate \Console \Command ;
8+ use Symfony \Component \Console \Input \InputArgument ;
9+ use Symfony \Component \Console \Input \InputOption ;
810
911class Import extends Command
1012{
@@ -15,17 +17,14 @@ class Import extends Command
1517 *
1618 * @var string
1719 */
18- protected $ signature = 'adldap:import
19- {user?}
20- {--filter= : A raw filter for limiting users imported.}
21- {--log=true : Log successful and unsuccessful imported users.} ' ;
20+ protected $ name = 'adldap:import ' ;
2221
2322 /**
2423 * The console command description.
2524 *
2625 * @var string
2726 */
28- protected $ description = 'Imports users into the local database with a random 16 character hashed password. ' ;
27+ protected $ description = 'Imports LDAP users into the local database with a random 16 character hashed password. ' ;
2928
3029 /**
3130 * Execute the console command.
@@ -115,6 +114,32 @@ public function isLogging()
115114 return $ this ->option ('log ' ) == 'true ' ;
116115 }
117116
117+ /**
118+ * Get the console command arguments.
119+ *
120+ * @return array
121+ */
122+ public function getArguments ()
123+ {
124+ return [
125+ ['user ' , InputArgument::OPTIONAL , 'The specific user to import using ANR. ' ],
126+ ];
127+ }
128+
129+ /**
130+ * Get the console command options.
131+ *
132+ * @return array
133+ */
134+ public function getOptions ()
135+ {
136+ return [
137+ ['filter ' , null , InputOption::VALUE_OPTIONAL , 'The raw filter for limiting users imported. ' ],
138+
139+ ['log ' , true , InputOption::VALUE_OPTIONAL , 'Log successful and unsuccessful imported users. ' ]
140+ ];
141+ }
142+
118143 /**
119144 * {@inheritdoc}
120145 */
0 commit comments